⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transformat.java

📁 java+jsp+mssql开发
💻 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 + -