| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| protected final byte[][] | |
| protected static final ThreadLocal | _bufferRecycler
This |
| pack-priv int | _byteCount
Total read byte count; used for error reporting purposes |
| pack-priv int | _charCount
Total read character count; used for error reporting purposes |
| protected byte[] | |
| protected int | _inputEnd
Pointed to the end marker, that is, position one after the last valid available byte. |
| protected int | _inputPtr
Pointer to the next available byte (if any), iff less than
|
| private InputStream | |
| protected int | _surrogate
Decoded first character of a surrogate pair, if one needs to be buffered |
| private char[] | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static byte[][] | |
| protected final boolean | |
| public void | close()
Implements abstract java. Implements java. Closes the stream and releases any system resources associated with it. |
| public final void | |
| protected final InputStream | |
| 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 | read()
Overrides java. Although this method is implemented by the base class, AND it should never be called by Woodstox code, let's still implement it bit more efficiently just in case |
| public int | |
| public int | read(final char[]
Destination buffer cbuf, final int Offset at which to start storing characters start, int Maximum number of characters to read len)Implements abstract java. Reads characters into a portion of an array. |
| protected final int | Returns: Number of bytes read, if any; -1 for end-of-input.Method for reading as many bytes from the underlying stream as possible (that fit in the buffer), to the beginning of the buffer. |
| protected final int | Returns: Number of bytes read, if any; -1 to indicate none available (that is, end of input)Method for reading as many bytes from the underlying stream as possible (that fit in the buffer considering offset), to the specified offset. |
| protected void | |
| private void | |
| private void | |
| protected void | |
| private void |
| _autoClose | back to summary |
|---|---|
| private final boolean _autoClose | |
| _bufferHolder | back to summary |
|---|---|
| protected final byte[][] _bufferHolder | |
| _bufferRecycler | back to summary |
|---|---|
| protected static final ThreadLocal<SoftReference<byte[][]>> _bufferRecycler This | |
| _byteCount | back to summary |
|---|---|
| pack-priv int _byteCount Total read byte count; used for error reporting purposes | |
| _charCount | back to summary |
|---|---|
| pack-priv int _charCount Total read character count; used for error reporting purposes | |
| _inputBuffer | back to summary |
|---|---|
| protected byte[] _inputBuffer | |
| _inputEnd | back to summary |
|---|---|
| protected int _inputEnd Pointed to the end marker, that is, position one after the last valid available byte. | |
| _inputPtr | back to summary |
|---|---|
| protected int _inputPtr Pointer to the next available byte (if any), iff less than
| |
| _inputSource | back to summary |
|---|---|
| private InputStream _inputSource | |
| _surrogate | back to summary |
|---|---|
| protected int _surrogate Decoded first character of a surrogate pair, if one needs to be buffered | |
| _tmpBuffer | back to summary |
|---|---|
| private char[] _tmpBuffer | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_BUFFER_SIZE | |
| UTF8Reader | back to summary |
|---|---|
| public UTF8Reader(InputStream in, boolean autoClose) | |
| UTF8Reader | back to summary |
|---|---|
| public UTF8Reader(byte[] buf, int ptr, int len, boolean autoClose) | |
| _findBufferHolder | back to summary |
|---|---|
| private static byte[][] _findBufferHolder() | |
| canModifyBuffer | back to summary |
|---|---|
| protected final boolean canModifyBuffer() Method that can be used to see if we can actually modify the underlying buffer. This is the case if we are managing the buffer, but not if it was just given to us. | |
| 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.
| |
| freeBuffers | back to summary |
|---|---|
| public final 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). | |
| getStream | back to summary |
|---|---|
| protected final InputStream getStream() | |
| loadMore | back to summary |
|---|---|
private boolean loadMore(int available) throws IOException
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Although this method is implemented by the base class, AND it should never be called by Woodstox code, let's still implement it bit more efficiently just in case
| |
| 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 Method for reading as many bytes from the underlying stream as possible (that fit in the buffer), to the beginning of the buffer.
| |
| readBytesAt | back to summary |
|---|---|
| protected final int readBytesAt(int offset) throws IOException Method for reading as many bytes from the underlying stream as possible (that fit in the buffer considering offset), to the specified offset.
| |
| 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 | |