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