The construction method of the three parameters of the String class.
String (byte [] byte, int start, int length); If the byte array specifies a length of 12 but only stores 10 bytes, the length here can be up to 10, this understanding is super simple and never understood before. The API uses the default Character Set of the platform to decode the specified byte sub-array and construct a newString. NewStringIs a character set function, so it may not be equal to the length of the sub-array. If the given byte is invalid in the given character set, the behavior of this constructor is not specified. If you need more control over the decoding process, useCharsetDecoderClass.
The api cannot be understood. Ignore it first. Let's take a look at the application of this constructor, the output statement in the while loop. The result is that the html source code of the Baidu homepage is output on the console.