摘要: 1 package com.jdk7.chapter5; 2 3 import java.io.UnsupportedEncodingException; 4 5 public class ChangeCharsetTest { 6 //公共的唯一静态变量 7 public static final String US_ASCII = "US-ASCII"; ... 阅读全文
posted @ 2018-02-23 21:55 celineluo 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 1 package com.jdk7.chapter5; 2 3 /** 4 * 仅能校验15位或18位身份证号的校验码 5 * @author Administrator 6 * 7 */ 8 public class IDCardTest { 9 private static final int[] weigth = new int[] {7,9,10,5... 阅读全文
posted @ 2018-02-23 20:35 celineluo 阅读(555) 评论(0) 推荐(0) 编辑
摘要: 1 package com.jdk7.chapter5; 2 3 import java.math.BigInteger; 4 5 public class IPToLong { 6 /** 7 * 将字符串类型的IP转换为整型: 8 * 1.IP中每个"."的位置(第二个"."以后的起始位置需要在第一个位置的基础上+1) 9 * 2.... 阅读全文
posted @ 2018-02-23 16:51 celineluo 阅读(1254) 评论(0) 推荐(0) 编辑
摘要: 1 package com.jdk7.chapter5; 2 /** 3 * 4 * @author Administrator 5 * 6 */ 7 public class StringBufferTest { 8 9 public static void findStr(StringBuffer sb, String dest){ 10 ... 阅读全文
posted @ 2018-02-23 14:47 celineluo 阅读(118) 评论(0) 推荐(0) 编辑