PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 1package org.ictclas4j.test;
 2
 3import java.io.IOException;
 4
 5import com.gftech.util.GFFile;
 6import com.gftech.util.GFString;
 7
 8public class ExportGBK {
 9
10	 
11	public static void main(String[] args) { 
12		String rs="";
13		for(int i=0x8140,j=1;i<=0xfefe;i++,j++)
14		{
15			
16			byte[] bs=new byte[2];
17			bs[0]=(byte)((i&0xFF00)>>8);
18			bs[1]=(byte)(i&0xFF);
19			rs+="0x"+GFString.bytes2hex(bs)+":"+new String(bs)+" ";
20			if(j%10==0){
21				try {
22					System.out.println(rs);
23					GFFile.writeTxtFile("gbk.txt",rs,true);
24					rs="";
25				} catch (IOException e) { 
26					e.printStackTrace();
27				}
28			}
29		}
30	}
31
32}