byte[] buffer or
java.io.InputStream .
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private int | _byteCount
Total read byte count; used for error reporting purposes |
| private int | _charCount
Total read character count; used for error reporting purposes |
| private byte[] | |
| private final boolean | _inputBufferReadOnly
Flag set to indicate |
| private int | _inputEnd
Pointed to the end marker, that is, position one after the last valid available byte. |
| private int | _inputPtr
Pointer to the next available byte (if any), iff less than
|
| private InputStream | |
| private final IOContext | _ioContext
IO context to use for returning input buffer, iff buffer is to be recycled when input ends. |
| private int | _surrogate
Decoded first character of a surrogate pair, if one needs to be buffered |
| private char[] |
| Access | Constructor and Description |
|---|---|
| private | UTF8Reader(IOContext ctxt, InputStream in, boolean autoClose, byte[] buf, int ptr, int end, boolean inputBufferReadOnly)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. Closes the stream and releases any system resources associated with it. |
| public static UTF8Reader | |
| public static UTF8Reader | |
| private void | |
| private boolean | Returns: True, if enough bytes were read to allow decoding of at least one full character; false if EOF was encountered instead.Number of "unused" bytes in the input buffer available)
|
| public int | |
| public int | |
| public int | read(final char[] cbuf, final int start, int len)
Implements abstract java. Reads characters into a portion of an array. |
| protected final int | |
| protected final int | |
| protected void | |
| private void | |
| private void | |
| protected void | |
| private void |
| _autoClose | back to summary |
|---|---|
| private final boolean _autoClose | |
| _byteCount | back to summary |
|---|---|
| private int _byteCount Total read byte count; used for error reporting purposes | |
| _charCount | back to summary |
|---|---|
| private int _charCount Total read character count; used for error reporting purposes | |
| _inputBuffer | back to summary |
|---|---|
| private byte[] _inputBuffer | |
| _inputBufferReadOnly | back to summary |
|---|---|
| private final boolean _inputBufferReadOnly Flag set to indicate
| |
| _inputEnd | back to summary |
|---|---|
| private int _inputEnd Pointed to the end marker, that is, position one after the last valid available byte. | |
| _inputPtr | back to summary |
|---|---|
| private int _inputPtr Pointer to the next available byte (if any), iff less than
| |
| _inputSource | back to summary |
|---|---|
| private InputStream _inputSource | |
| _ioContext | back to summary |
|---|---|
| private final IOContext _ioContext IO context to use for returning input buffer, iff buffer is to be recycled when input ends. | |
| _surrogate | back to summary |
|---|---|
| private int _surrogate Decoded first character of a surrogate pair, if one needs to be buffered | |
| _tmpBuffer | back to summary |
|---|---|
| private char[] _tmpBuffer | |
| UTF8Reader | back to summary |
|---|---|
| private UTF8Reader(IOContext ctxt, InputStream in, boolean autoClose, byte[] buf, int ptr, int end, boolean inputBufferReadOnly) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.
| |
| construct | back to summary |
|---|---|
| public static UTF8Reader construct(IOContext ctxt, InputStream in, boolean autoClose) | |
| construct | back to summary |
|---|---|
| public static UTF8Reader construct(byte[] buf, int ptr, int len) | |
| freeBuffers | back to summary |
|---|---|
| private void freeBuffers() This method should be called along with (or instead of) normal close. After calling this method, no further reads should be tried. Method will try to recycle read buffers (if any). | |
| loadMore | back to summary |
|---|---|
private boolean loadMore(int available) throws IOException
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public int read(char[] cbuf) throws IOException Overrides java. Doc from java. Reads characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If the length of
| |
| read | back to summary |
|---|---|
| public int read(final char[] cbuf, final int start, int len) throws IOException Implements abstract java. Doc from java. Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached. If
| |
| readBytes | back to summary |
|---|---|
| protected final int readBytes() throws IOException | |
| readBytesAt | back to summary |
|---|---|
| protected final int readBytesAt(int offset) throws IOException | |
| reportBounds | back to summary |
|---|---|
| protected void reportBounds(char[] cbuf, int start, int len) throws IOException | |
| reportInvalidInitial | back to summary |
|---|---|
| private void reportInvalidInitial(int mask, int offset) throws IOException | |
| reportInvalidOther | back to summary |
|---|---|
| private void reportInvalidOther(int mask, int offset) throws IOException | |
| reportStrangeStream | back to summary |
|---|---|
| protected void reportStrangeStream() throws IOException | |
| reportUnexpectedEOF | back to summary |
|---|---|
| private void reportUnexpectedEOF(int gotBytes, int needed) throws IOException | |