看看String类的构造方法
类别: JAVA教程
String
public String(byte[] bytes,
String enc)
throws UnsupportedEncodingException
Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported
Since:
JDK1.1
public String(byte[] bytes,
String enc)
throws UnsupportedEncodingException
Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported
Since:
JDK1.1
- 上一篇: Java混淆编译器(转apusic.com)
- 下一篇: 异常处理优劣观(转载)
-= 资 源 教 程 =-
文 章 搜 索