摘要:
下面有四种方法,估计好用的应该是第三种吧。 1.用JAVA自带的函数 public static boolean isNumeric(String str){ for (int i = str.length();--i>=0;){ if (!Character.isDigit(str.charAt(i))){ return false; } } return true; } 2.正则... 阅读全文
摘要:
HttpClient 类库中GetMethod类的getResponseBody方法返回的是byte[]类型,要操作起来不方便,我想把它转化成String类型。 查了网上的资料,有说法认为用这种方法比较好 BASE64Encoder enc=new BASE64Encoder(); String 转换后的string=enc.encode(byte数组); 参考http://hi.baidu.co... 阅读全文