摘要: public static void main(String[] args) throws Exception { String hello = URLEncoder.encode("大家好才是真的好", "UTF-8"); System.out.println(hello); hello = URLDecoder.decode(hello, "U... 阅读全文
posted @ 2017-09-05 15:18 BINGJJFLY 阅读(364) 评论(0) 推荐(0) 编辑
摘要: if ("30".equals(date)) { Calendar now = Calendar.getInstance(); now.setTime(new Date()); now.set(Calendar.DATE, now.get(Calendar.DATE) - 30); ... 阅读全文
posted @ 2017-09-05 10:36 BINGJJFLY 阅读(387) 评论(0) 推荐(0) 编辑
摘要: package com.wjz.util; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class SHA1Util { public static S... 阅读全文
posted @ 2017-09-05 10:12 BINGJJFLY 阅读(440) 评论(0) 推荐(0) 编辑
摘要: package com.wjz.util; import java.security.MessageDigest; import org.apache.log4j.Logger; /** * MD5安全加密 * @author wjz * */ public class MD5Util { private static Logger logger = Logger... 阅读全文
posted @ 2017-09-05 10:07 BINGJJFLY 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 十进制整数输出,宽度10位,不足前面补0;比如:printf("%010d", 234);输出:0000000234 阅读全文
posted @ 2017-09-05 09:52 BINGJJFLY 阅读(223) 评论(0) 推荐(0) 编辑