标签:style blog color ar for sp div log amp
1 public static String toUnicode(String s) 2 { 3 String as[] = new String[s.length()]; 4 String s1 = ""; 5 for (int i = 0; i < s.length(); i++) 6 { 7 as[i] = Integer.toHexString(s.charAt(i) & 0xffff); 8 s1 = s1 + as[i]+"\t"; 9 } 10 return s1; 11 }
1 public static String toChineseHex(String s) 2 { 3 String ss = s; 4 byte[] bt = ss.getBytes(); 5 String s1 = ""; 6 for (int i = 0; i < bt.length; i++) 7 { 8 String tempStr = Integer.toHexString(bt[i]); 9 if (tempStr.length() > 2) 10 tempStr = tempStr.substring(tempStr.length() - 2); 11 s1 = s1 + tempStr + " "; 12 } 13 return s1.toUpperCase(); 14 }
标签:style blog color ar for sp div log amp
原文地址:http://www.cnblogs.com/stone1022/p/4046588.html