上一页 1 ··· 14 15 16 17 18
摘要: GET请求 GetMethod getMethod=null; String datas = "json=" + plain; HttpClient httpClient = new HttpClient(); // GET 查询交易报文 getMethod=new GetMethod();getM 阅读全文
posted @ 2018-05-09 16:48 宇枫 阅读(3916) 评论(0) 推荐(0) 编辑
摘要: 注意:java.net的url编码方法在对一些特殊符号编码时有个bug,如:+号decord时,+号会变成空格,需要把+号替换成%2B,str=str.replaceAll("\\+", "%2B"); 阅读全文
posted @ 2018-05-09 16:18 宇枫 阅读(66802) 评论(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 宇枫 阅读(28718) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18