12 2013 档案

摘要:在带文件头的UTF-16系列文件中:(文件前三个字节是文件头)UTF-16 0xfe 0xff 0xfeUTF-16LE 0xff 0xfe 0x2dUTF-16BE 0xfe 0xff 0x4e对于带有UTF-16系列文件头的字符串去除文件头的处理方法如下: public static String removeUTFSignature(String strKey, String encoding) throws IOException { String resultKey = strKey; int index = 0; int[] utf... 阅读全文
posted @ 2013-12-03 11:11 Yak Wang 阅读(659) 评论(0) 推荐(0)
摘要:public static String removeUTF8Signature(String strKey) throws IOException { String resultKey = strKey; int index = 0; DataInputStream dis=new DataInputStream(new ByteArrayInputStream(strKey.getBytes())); while(true) { int bb1 = dis.read(); int b... 阅读全文
posted @ 2013-12-02 17:32 Yak Wang 阅读(548) 评论(0) 推荐(0)