public class Utf8InputStreamReader extends Reader
|Constructor and Description|
Constructs a new
|Modifier and Type||Method and Description|
Closes this reader.
Reads a single character from this reader and returns it as an integer with the two higher-order bytes set to 0.
Reads at most
public Utf8InputStreamReader(InputStream inputStream)
in. This constructor sets the character converter to the encoding specified in the "file.encoding" property and falls back to ISO 8859_1 (ISO-Latin-1) if the property doesn't exist.
inputStream- the input stream from which to read characters.
public Utf8InputStreamReader(ByteArrayRange byteArrayRange)
public void close()
public int read()
public int read(char buffer, int offset, int length)
lengthcharacters from this reader and stores them at position
offsetin the character array
buf. Returns the number of characters actually read or -1 if the end of the reader has been reached. The bytes are either obtained from converting bytes in this reader's buffer or by first filling the buffer from the source InputStream and then reading from the buffer.
buffer- the array to store the characters read
offset- the initial position in
bufto store the characters read from this reader
length- the maximum number of characters to read
CharConversionException- if the stream isn't valid UTF-8