public final class UTF32Reader
extends java.io.Reader
| Modifier and Type | Field | Description |
|---|---|---|
protected byte[] |
_buffer |
|
protected IOContext |
_context |
|
protected java.io.InputStream |
_in |
|
protected int |
_length |
|
protected int |
_ptr |
|
protected char[] |
_tmpBuf |
|
protected static 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 char |
NULL_BYTE |
|
protected static char |
NULL_CHAR |
| Constructor | Description |
|---|---|
UTF32Reader(IOContext ctxt,
java.io.InputStream in,
byte[] buf,
int ptr,
int len,
boolean isBigEndian) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
freeBuffers() |
This method should be called along with (or instead of) normal
close.
|
int |
read() |
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
|
int |
read(char[] cbuf,
int start,
int len) |
|
protected void |
reportBounds(char[] cbuf,
int start,
int len) |
|
protected void |
reportStrangeStream() |
protected static final int LAST_VALID_UNICODE_CHAR
protected static final char NULL_CHAR
protected static final char NULL_BYTE
protected final IOContext _context
protected java.io.InputStream _in
protected byte[] _buffer
protected int _ptr
protected int _length
protected char[] _tmpBuf
public UTF32Reader(IOContext ctxt, java.io.InputStream in, byte[] buf, int ptr, int len, boolean isBigEndian)
public int read(char[] cbuf,
int start,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in class java.io.Readerjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic final void freeBuffers()
protected void reportBounds(char[] cbuf,
int start,
int len)
throws java.io.IOException
java.io.IOExceptionprotected void reportStrangeStream()
throws java.io.IOException
java.io.IOException