无忧岛renial.blog.chinaunix.net
reniaL
全部博文(20)
2011年(1)
2010年(1)
2009年(2)
2008年(16)
wb123456
头西昏啊
Amerone
wangyong
lijichao
慕容云白
18370661
taxuewh
kakukonr
分类: Java
2008-04-10 08:12:37
public class Ascii { public static void main(String args[]) { String str; if (args != null && args.length > 0) { str = args[0]; } else { str = "0068%u0074%u0074%u0070%u003A%u002F%u002F%u0032%u0063%u0070%u0069%u0063%u0031%u0032%u002E%u0079%u006F%u0075%u0072%u006F%u0075%u0072%u002E%u0063%u006F%u006D%u002F%u006A%u002F%u8857%u9738%u2162%u002F%u8857%u9738%u2162%u005F%u0043%u0048%u0030%u0030%u0031%u002F%u0053%u0046%u0049%u0049%u0049%u004E%u0065%u0077%u0047%u0065%u006E%u0065%u0072%u0061%u0074%u0069%u006F%u006E%u005F%u0030%u0030%u0031%u005F%u0030%u0034%u0035%u002E%u006A%u0070%u0067"; } String strs[] = str.split("%u"); char[] chars = new char[strs.length]; // for (int i=0; i// if (strs[i].equals("")) {// System.out.println(i);// }// } for (int i=0; i<strs.length; i++) { chars[i] = (char)Integer.parseInt(strs[i], 16); } String result = new String(chars); System.out.println(result); }}
上一篇:诡异的错误
下一篇:Linux文件解压缩
chinaunix网友2009-11-26 09:44:16
领教了www.louqu.net谢谢
登录 注册