当前位置: 技术问答>java相关
String(byte[] bytes, int offset, int length)括号里的参数是什么意思?
来源: 互联网 发布时间:2015-02-18
本文导语: | public String(byte[] bytes, int offset, int length) Construct a new String by converting the specified subarray of bytes using the platform's default character encoding. The length of the new Stri...
|
public String(byte[] bytes,
int offset,
int length)
Construct a new String by converting the specified subarray of bytes using the platform's default 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 subarray.
Parameters:
bytes - The bytes to be converted into characters
offset - Index of the first byte to convert
length - Number of bytes to convert
int offset,
int length)
Construct a new String by converting the specified subarray of bytes using the platform's default 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 subarray.
Parameters:
bytes - The bytes to be converted into characters
offset - Index of the first byte to convert
length - Number of bytes to convert