/ictclas4j/src/org/ictclas4j/test/ExportGBK.java
http://ictclas4j.googlecode.com/ · Java · 32 lines · 25 code · 7 blank · 0 comment · 2 complexity · af1f4a2f504cb8612c0830f914e83b35 MD5 · raw file
- package org.ictclas4j.test;
-
- import java.io.IOException;
-
- import com.gftech.util.GFFile;
- import com.gftech.util.GFString;
-
- public class ExportGBK {
-
-
- public static void main(String[] args) {
- String rs="";
- for(int i=0x8140,j=1;i<=0xfefe;i++,j++)
- {
-
- byte[] bs=new byte[2];
- bs[0]=(byte)((i&0xFF00)>>8);
- bs[1]=(byte)(i&0xFF);
- rs+="0x"+GFString.bytes2hex(bs)+":"+new String(bs)+" ";
- if(j%10==0){
- try {
- System.out.println(rs);
- GFFile.writeTxtFile("gbk.txt",rs,true);
- rs="";
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- }