摘要: 注:更详细https://blog.csdn.net/androidboy365/article/details/50540202/ 不要在 foreach 循环里进行元素的 remove/add 操作。remove 元素请使用 Iterator 方式,如果并发操作,需要对 Iterator 对象加 阅读全文
posted @ 2018-05-09 16:53 宇枫 阅读(459) 评论(0) 推荐(0) 编辑
摘要: GET请求 GetMethod getMethod=null; String datas = "json=" + plain; HttpClient httpClient = new HttpClient(); // GET 查询交易报文 getMethod=new GetMethod();getM 阅读全文
posted @ 2018-05-09 16:48 宇枫 阅读(3913) 评论(0) 推荐(0) 编辑
摘要: 注意:java.net的url编码方法在对一些特殊符号编码时有个bug,如:+号decord时,+号会变成空格,需要把+号替换成%2B,str=str.replaceAll("\\+", "%2B"); 阅读全文
posted @ 2018-05-09 16:18 宇枫 阅读(66792) 评论(0) 推荐(1) 编辑
摘要: import java.security.MessageDigest; public class SignatureSHA { public static String signSHA(String sha,Object ...arguments){ try{ StringBuffer string 阅读全文
posted @ 2018-05-09 16:07 宇枫 阅读(2054) 评论(0) 推荐(0) 编辑
摘要: private static int a=0; public static void main( String[] args ) { timer(); } public static void timer() { Calendar c = Calendar.getInstance(); c.set( 阅读全文
posted @ 2018-05-09 15:32 宇枫 阅读(7223) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { String time = System.currentTimeMillis();//获取当前时间精确到毫秒级的时间戳,例:1525849325942 System.out.println(timeStamp2Date(time)) } public static String t... 阅读全文
posted @ 2018-05-09 15:06 宇枫 阅读(28710) 评论(0) 推荐(0) 编辑