stringtrans.java
来自「开发阳光非亚斯BBS系统最终目的是为企业内部员工提供一个良好的技术交流平台」· Java 代码 · 共 49 行
JAVA
49 行
package com.wsy.struts.util ;import java.io.*;public class StringTrans{ public static String tranA(String chi) { String result=null; byte temp[]; try { temp=chi.getBytes("UTF-8"); result=new String(temp); }catch(UnsupportedEncodingException e) { System.out.println(e.toString()); } return result; } public static String tranB(String chB) { String result=null; byte temp[]; try { temp=chB.getBytes("UTF-8"); result=new String(temp,"iso-8859-1"); }catch(UnsupportedEncodingException e) { System.out.println(e.toString()); } return result; } public static String tranC(String chB) { String result=null; byte temp[]; try { temp=chB.getBytes("iso-8859-1"); result=new String(temp,"UTF-8"); }catch(UnsupportedEncodingException e) { System.out.println(e.toString()); } return result; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?