| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | |
| protected byte[] | |
| protected int | _byteCount
Total read byte count; used for error reporting purposes |
| protected int | _charCount
Total read character count; used for error reporting purposes |
| protected final IOContext | |
| protected InputStream | |
| protected int | |
| protected final boolean | |
| protected int | |
| protected char | _surrogate
Although input is fine with full Unicode set, Java still uses 16-bit chars, so we may have to split high-order chars into surrogate pairs. |
| protected char[] | |
| protected static final int | LAST_VALID_UNICODE_CHAR
JSON actually limits available Unicode range in the high end to the same as xml (to basically limit UTF-8 max byte sequence length to 4) |
| protected static final char |
| Access | Constructor and Description |
|---|---|
| public |
| 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. |
| 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 | read()
Overrides java. Although this method is implemented by the base class, AND it should never be called by main code, let's still implement it bit more efficiently just in case |
| public int | read(char[]
Destination buffer cbuf, 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. |
| private void | |
| private void | |
| private void | |
| private void |
| _bigEndian | back to summary |
|---|---|
| protected final boolean _bigEndian | |
| _buffer | back to summary |
|---|---|
| protected byte[] _buffer | |
| _byteCount | back to summary |
|---|---|
| protected int _byteCount Total read byte count; used for error reporting purposes | |
| _charCount | back to summary |
|---|---|
| protected int _charCount Total read character count; used for error reporting purposes | |
| _context | back to summary |
|---|---|
| protected final IOContext _context | |
| _in | back to summary |
|---|---|
| protected InputStream _in | |
| _length | back to summary |
|---|---|
| protected int _length | |
| _managedBuffers | back to summary |
|---|---|
| protected final boolean _managedBuffers | |
| _ptr | back to summary |
|---|---|
| protected int _ptr | |
| _surrogate | back to summary |
|---|---|
| protected char _surrogate Although input is fine with full Unicode set, Java still uses 16-bit chars, so we may have to split high-order chars into surrogate pairs. | |
| _tmpBuf | back to summary |
|---|---|
| protected char[] _tmpBuf | |
| LAST_VALID_UNICODE_CHAR | back to summary |
|---|---|
| protected static final int LAST_VALID_UNICODE_CHAR JSON actually limits available Unicode range in the high end to the same as xml (to basically limit UTF-8 max byte sequence length to 4) | |
| NC | back to summary |
|---|---|
| protected static final char NC | |
| UTF32Reader | back to summary |
|---|---|
| public UTF32Reader(IOContext ctxt, InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian) | |
| 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 |
|---|---|
| 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. Although this method is implemented by the base class, AND it should never be called by main code, let's still implement it bit more efficiently just in case
| |
| read | back to summary |
|---|---|
| public int read(char[] cbuf, 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
| |
| reportBounds | back to summary |
|---|---|
| private void reportBounds(char[] cbuf, int start, int len) throws IOException | |
| reportInvalid | back to summary |
|---|---|
| private void reportInvalid(int value, int offset, String msg) throws IOException | |
| reportStrangeStream | back to summary |
|---|---|
| private void reportStrangeStream() throws IOException | |
| reportUnexpectedEOF | back to summary |
|---|---|
| private void reportUnexpectedEOF(int gotBytes, int needed) throws IOException | |