| Modifier and Type | Field and Description |
|---|---|
| protected byte[] | _inputBuffer
This buffer is actually provided via |
| protected int | _origBufferLen
In addition to current buffer pointer, and end pointer, we will also need to know number of bytes originally contained. |
| Access | Constructor and Description |
|---|---|
| public | NonBlockingByteArrayParser(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym)
|
| Modifier and Type | Method and Description |
|---|---|
| private final boolean | |
| protected final boolean | |
| private final String | |
| private final String | |
| private final String | _decodeShortUnicodeText(byte[] inBuf, int inPtr, int
Length between 1 and 64 len)Helper method used to decode short Unicode string, length for which actual length (in bytes) is known |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected JsonToken | _finishHeader(int state)
Helper method that will decode information from a header block that has been detected. |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final boolean | |
| private final JsonToken | |
| private final JsonToken | |
| protected final JsonToken | _finishToken()
Method called when a (scalar) value type has been detected, but not all of contents have been decoded due to incomplete input available. |
| private final int | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | _startFieldName(int ch)
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT. |
| protected final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| private final JsonToken | |
| private final JsonToken | |
| private final JsonToken | _startValue(int ch)
Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer. |
| public void | endOfInput()
Implements com. Method that should be called after last chunk of data to parse has been fed
(with |
| public void | feedInput(byte[]
Byte array that contains data to feed: caller must ensure data remains
stable until it is fully processed (which is true when buf, int needMoreInput
returns true)Offset within array where input data to process starts start, int Offset after last byte contained in the input array end)Implements com. Method that can be called to feed more data, if (and only if)
|
| public ByteArrayFeeder | getNonBlockingInputFeeder()
Overrides com. Method that will either return a feeder instance (if parser uses
non-blocking, aka asynchronous access); or |
| public final boolean | needMoreInput()
Implements com. Method called to check whether it is ok to feed more data: parser returns true if it has no more content to parse (and it is ok to feed more); otherwise false (and no data should yet be fed). |
| public JsonToken | nextToken()
Implements abstract com. Main iteration method, which will advance stream enough to determine type of the next token, if any. |
| public int | releaseBuffered(OutputStream
OutputStream to which buffered, undecoded content is written to out)Implements abstract com. Method that can be called to push back any content that has been read but not consumed by the parser. |
| _inputBuffer | back to summary |
|---|---|
| protected byte[] _inputBuffer This buffer is actually provided via | |
| _origBufferLen | back to summary |
|---|---|
| protected int _origBufferLen In addition to current buffer pointer, and end pointer, we will also need to know number of bytes originally contained. This is needed to correctly update location information when the block has been completed. | |
| NonBlockingByteArrayParser | back to summary |
|---|---|
| public NonBlockingByteArrayParser(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym) | |
| _decode7BitEncoded | back to summary |
|---|---|
| private final boolean _decode7BitEncoded() throws IOException | |
| _decode7BitEncodedTail | back to summary |
|---|---|
| protected final boolean _decode7BitEncodedTail(int bytesToDecode, int buffered) throws IOException | |
| _decodeASCIIText | back to summary |
|---|---|
| private final String _decodeASCIIText(byte[] inBuf, int inPtr, int len) throws IOException | |
| _decodeLongUnicodeName | back to summary |
|---|---|
| private final String _decodeLongUnicodeName(byte[] inBuf, int inPtr, int len) throws IOException | |
| _decodeShortUnicodeText | back to summary |
|---|---|
| private final String _decodeShortUnicodeText(byte[] inBuf, int inPtr, int len) throws IOException Helper method used to decode short Unicode string, length for which actual length (in bytes) is known
| |
| _decodeUTF8_2 | back to summary |
|---|---|
| private final int _decodeUTF8_2(int c, int d) throws IOException | |
| _decodeUTF8_3 | back to summary |
|---|---|
| private final int _decodeUTF8_3(int c, int d, int e) throws IOException | |
| _decodeUTF8_4 | back to summary |
|---|---|
| private final int _decodeUTF8_4(int c, int d, int e, int f) throws IOException | |
| _decodeVInt | back to summary |
|---|---|
| private final int _decodeVInt() throws IOException | |
| _finish7BitBinaryBody | back to summary |
|---|---|
| private final JsonToken _finish7BitBinaryBody() throws IOException | |
| _finish7BitBinaryLen | back to summary |
|---|---|
| private final JsonToken _finish7BitBinaryLen(int value, int bytesRead) throws IOException | |
| _finishBigDecimalBody | back to summary |
|---|---|
| private final JsonToken _finishBigDecimalBody() throws IOException | |
| _finishBigDecimalLen | back to summary |
|---|---|
| private final JsonToken _finishBigDecimalLen(int value, int bytesRead) throws IOException | |
| _finishBigDecimalScale | back to summary |
|---|---|
| private final JsonToken _finishBigDecimalScale(int value, int bytesRead) throws IOException | |
| _finishBigIntBody | back to summary |
|---|---|
| private final JsonToken _finishBigIntBody() throws IOException | |
| _finishBigIntLen | back to summary |
|---|---|
| private final JsonToken _finishBigIntLen(int value, int bytesRead) throws IOException | |
| _finishDouble | back to summary |
|---|---|
| protected final JsonToken _finishDouble(long value, int bytesRead) throws IOException | |
| _finishFloat | back to summary |
|---|---|
| protected final JsonToken _finishFloat(int value, int bytesRead) throws IOException | |
| _finishHeader | back to summary |
|---|---|
| protected JsonToken _finishHeader(int state) throws IOException Helper method that will decode information from a header block that has been detected. | |
| _finishInt | back to summary |
|---|---|
| private final JsonToken _finishInt(int value, int bytesRead) throws IOException | |
| _finishLong | back to summary |
|---|---|
| private final JsonToken _finishLong(long value, int bytesRead) throws IOException | |
| _finishLongASCII | back to summary |
|---|---|
| private final JsonToken _finishLongASCII() throws IOException | |
| _finishLongFieldName | back to summary |
|---|---|
| private final JsonToken _finishLongFieldName(int outPtr) throws IOException | |
| _finishLongUnicode | back to summary |
|---|---|
| private final JsonToken _finishLongUnicode() throws IOException | |
| _finishPartialUnicodeChar | back to summary |
|---|---|
| private final boolean _finishPartialUnicodeChar() throws IOException | |
| _finishRawBinaryBody | back to summary |
|---|---|
| private final JsonToken _finishRawBinaryBody() throws IOException | |
| _finishRawBinaryLen | back to summary |
|---|---|
| private final JsonToken _finishRawBinaryLen(int value, int bytesRead) throws IOException | |
| _finishToken | back to summary |
|---|---|
| protected final JsonToken _finishToken() throws IOException Method called when a (scalar) value type has been detected, but not all of contents have been decoded due to incomplete input available. | |
| _fourBytesToInt | back to summary |
|---|---|
| private final int _fourBytesToInt(int ptr) throws IOException | |
| _start7BitBinary | back to summary |
|---|---|
| private final JsonToken _start7BitBinary() throws IOException | |
| _startBigDecimal | back to summary |
|---|---|
| private final JsonToken _startBigDecimal() throws IOException | |
| _startBigInt | back to summary |
|---|---|
| private final JsonToken _startBigInt() throws IOException | |
| _startDouble | back to summary |
|---|---|
| protected final JsonToken _startDouble() throws IOException | |
| _startFieldName | back to summary |
|---|---|
| protected final JsonToken _startFieldName(int ch) throws IOException Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT. | |
| _startFloat | back to summary |
|---|---|
| protected final JsonToken _startFloat() throws IOException | |
| _startInt | back to summary |
|---|---|
| private final JsonToken _startInt() throws IOException | |
| _startLong | back to summary |
|---|---|
| private final JsonToken _startLong() throws IOException | |
| _startLongASCII | back to summary |
|---|---|
| private final JsonToken _startLongASCII() throws IOException | |
| _startLongUnicode | back to summary |
|---|---|
| protected final JsonToken _startLongUnicode() throws IOException | |
| _startRawBinary | back to summary |
|---|---|
| protected final JsonToken _startRawBinary() throws IOException | |
| _startShortASCII | back to summary |
|---|---|
| private final JsonToken _startShortASCII(final int len) throws IOException | |
| _startShortUnicode | back to summary |
|---|---|
| private final JsonToken _startShortUnicode(final int len) throws IOException | |
| _startValue | back to summary |
|---|---|
| private final JsonToken _startValue(int ch) throws IOException Helper method called to detect type of a value token (at any level), and possibly decode it if contained in input buffer. Note that possible header has been ruled out by caller and is not checked here. | |
| endOfInput | back to summary |
|---|---|
| public void endOfInput() Implements com. Doc from com. Method that should be called after last chunk of data to parse has been fed
(with
| |
| feedInput | back to summary |
|---|---|
| public void feedInput(byte[] buf, int start, int end) throws IOException Implements com. Doc from com. Method that can be called to feed more data, if (and only if)
| |
| getNonBlockingInputFeeder | back to summary |
|---|---|
| public ByteArrayFeeder getNonBlockingInputFeeder() Overrides com. Doc from com. Method that will either return a feeder instance (if parser uses
non-blocking, aka asynchronous access); or
| |
| needMoreInput | back to summary |
|---|---|
| public final boolean needMoreInput() Implements com. Doc from com. Method called to check whether it is ok to feed more data: parser returns true if it has no more content to parse (and it is ok to feed more); otherwise false (and no data should yet be fed).
| |
| nextToken | back to summary |
|---|---|
| public JsonToken nextToken() throws IOException Implements abstract com. Doc from com. Main iteration method, which will advance stream enough to determine type of the next token, if any. If none remaining (stream has no content other than possible white space before ending), null will be returned.
| |
| releaseBuffered | back to summary |
|---|---|
| public int releaseBuffered(OutputStream out) throws IOException Implements abstract com. Doc from com. Method that can be called to push back any content that has been read but not consumed by the parser. This is usually done after reading all content of interest using parser. Content is released by writing it to given stream if possible; if underlying input is byte-based it can released, if not (char-based) it can not.
| |