?? transformat.java
字號:
/*
* Created on 2004-9-21
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package util;
import java.io.*;
/**
* @author WineFox
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class TransFormat {
public static String unicode2GB(String strIn) {
byte b[];
String strOut = null;
if (strIn == null || ((strIn.trim()).equals("")))
return strIn;
try {
b = strIn.getBytes("GBK");
strOut = new String(b, "ISO8859_1");
} catch (UnsupportedEncodingException e) {
}
return strOut;
}
public static String GB2unicode(String strIn) {
String strOut = null;
if (strIn == null || ((strIn.trim()).equals("")))
return strIn;
try {
byte b[] = strIn.getBytes("ISO8859_1");
strOut = new String(b, "GBK");
} catch (Exception e) {
}
return strOut;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -