Open Declaration java.lang.String.String(byte[] bytes, int offset, int length) Constructs a new String by decoding the specified subarray of bytes using the platform's default charset. The length of the new String is a function of the charset, and hence may not be equal to the length of the subarray. The behavior of this constructor when the given bytes are not valid in the default charset is unspecified. The java.nio.charset.CharsetDecoder class should be used when more control over the decoding process is required.Parameters: bytes The bytes to be decoded into characters offset The index of the first byte to decode length The number of bytes to decode Throws: IndexOutOfBoundsException - If the offset and the length arguments index characters outside the bounds of the bytes array Since: JDK1.1这个eclipse里就能看
Constructs a new String by decoding the specified subarray of bytes using the platform's default charset. The length of the new String is a function of the charset, and hence may not be equal to the length of the subarray. The behavior of this constructor when the given bytes are not valid in the default charset is unspecified. The java.nio.charset.CharsetDecoder class should be used when more control over the decoding process is required.Parameters:
bytes The bytes to be decoded into characters
offset The index of the first byte to decode
length The number of bytes to decode
Throws:
IndexOutOfBoundsException - If the offset and the length arguments index characters outside the bounds of the bytes array
Since:
JDK1.1这个eclipse里就能看
从buf里面把0-len的字符串复制到text里面