| Modifier and Type | Field and Description |
|---|---|
| protected ByteArrayBuilder | _byteArrayBuilder
ByteArrayBuilder is needed if 'getBinaryValue' is called. |
| protected boolean | _endOfInput
Flag that is sent when calling application indicates that there will be no more input to parse. |
| protected byte[] | _inputCopy
Temporary buffer for holding content if input not contiguous (but can fit in buffer) |
| protected int | _inputCopyLen
Number of bytes buffered in |
| protected int | _majorState
Current main decoding state |
| protected int | _majorStateAfterValue
Value of |
| protected int | _minorState
Addition indicator within state; contextually relevant for just that state |
| protected int | _pending32
Temporary storage for 32-bit values (int, float), as well as length markers for length-prefixed values. |
| protected long | _pending64
Temporary storage for 64-bit values (long, double), secondary storage for some other things (scale of BigDecimal values) |
| protected static final int | |
| protected static final int | MAJOR_CLOSED
State after non-blocking input source has indicated that no more input is forthcoming AND we have exhausted all the input |
| protected static final int | MAJOR_INITIAL
State right after parser has been constructed, before seeing the first byte to know if there's header. |
| protected static final int | |
| protected static final int | |
| protected static final int | MAJOR_ROOT
State right after parser a root value has been finished, but next token has not yet been recognized. |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| protected | NonBlockingParserBase(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym)
|
| Modifier and Type | Method and Description |
|---|---|
| protected final String | |
| protected final void | |
| protected final JsonToken | |
| protected void | _closeInput()
Implements abstract com.
|
| protected final JsonToken | |
| protected final JsonToken | _eofAsNextToken()
Helper method called at point when all input has been exhausted and input feeder has indicated no more input will be forthcoming. |
| protected final String[] | _expandSeenNames(String[] oldShared)
Method called to try to expand shared name area to fit one more potentially shared String. |
| private final void | |
| protected final String | |
| private final String | |
| protected final JsonToken | |
| protected final JsonToken | |
| public void | |
| protected void | _parseNumericValue()
Implements abstract com.
|
| protected void | _releaseBuffers2()
Implements abstract com. Method called to release internal buffers owned by the base reader. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected final JsonToken | |
| protected final JsonToken | |
| protected final JsonToken | |
| public boolean | canParseAsync()
Overrides com. Method that can be called to determine if this parser instance uses non-blocking ("asynchronous") input access for decoding or not. |
| public byte[] | getBinaryValue(Base64Variant
Expected variant of base64 encoded
content (see b64variant)Base64Variants for definitions
of "standard" variants).Implements abstract com. Method that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value. |
| public ObjectCodec | getCodec()
Implements abstract com. Accessor for |
| public Object | getEmbeddedObject()
Overrides com. Accessor that can be called if (and only if) the current token
is |
| public Object | getInputSource()
Overrides com. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
|
| public String | getText()
Implements abstract com. Method for accessing textual representation of the current event;
if no current event (before first call to |
| public int | getText(Writer
Writer to write textual content to w)Overrides com. Method to read the textual representation of the current token in chunks and pass it to the given Writer. |
| public char[] | getTextCharacters()
Implements abstract com. Method similar to |
| public int | getTextLength()
Implements abstract com. Accessor used with |
| public int | getTextOffset()
Implements abstract com. Accessor used with |
| public boolean | hasTextCharacters()
Implements abstract com. Method that can be used to determine whether calling of
|
| public int | readBinaryValue(Base64Variant
base64 variant to use b64variant, OutputStream Output stream to use for passing decoded binary data out)Overrides com. Similar to |
| public abstract int | releaseBuffered(OutputStream
OutputStream to which buffered, undecoded content is written to out)Overrides com. Method that can be called to push back any content that has been read but not consumed by the parser. |
| public void | setCodec(ObjectCodec
Codec to assign, if any; c)null if noneImplements abstract com. Setter that allows defining |
| protected ByteQuadsCanonicalizer |
| _byteArrayBuilder | back to summary |
|---|---|
| protected ByteArrayBuilder _byteArrayBuilder ByteArrayBuilder is needed if 'getBinaryValue' is called. If so, we better reuse it for remainder of content. | |
| _endOfInput | back to summary |
|---|---|
| protected boolean _endOfInput Flag that is sent when calling application indicates that there will be no more input to parse. | |
| _inputCopy | back to summary |
|---|---|
| protected byte[] _inputCopy Temporary buffer for holding content if input not contiguous (but can fit in buffer) | |
| _inputCopyLen | back to summary |
|---|---|
| protected int _inputCopyLen Number of bytes buffered in | |
| _majorState | back to summary |
|---|---|
| protected int _majorState Current main decoding state | |
| _majorStateAfterValue | back to summary |
|---|---|
| protected int _majorStateAfterValue Value of | |
| _minorState | back to summary |
|---|---|
| protected int _minorState Addition indicator within state; contextually relevant for just that state | |
| _pending32 | back to summary |
|---|---|
| protected int _pending32 Temporary storage for 32-bit values (int, float), as well as length markers for length-prefixed values. | |
| _pending64 | back to summary |
|---|---|
| protected long _pending64 Temporary storage for 64-bit values (long, double), secondary storage for some other things (scale of BigDecimal values) | |
| MAJOR_ARRAY_ELEMENT | back to summary |
|---|---|
| protected static final int MAJOR_ARRAY_ELEMENT | |
| MAJOR_CLOSED | back to summary |
|---|---|
| protected static final int MAJOR_CLOSED State after non-blocking input source has indicated that no more input is forthcoming AND we have exhausted all the input | |
| MAJOR_INITIAL | back to summary |
|---|---|
| protected static final int MAJOR_INITIAL State right after parser has been constructed, before seeing the first byte to know if there's header. | |
| MAJOR_OBJECT_FIELD | back to summary |
|---|---|
| protected static final int MAJOR_OBJECT_FIELD | |
| MAJOR_OBJECT_VALUE | back to summary |
|---|---|
| protected static final int MAJOR_OBJECT_VALUE | |
| MAJOR_ROOT | back to summary |
|---|---|
| protected static final int MAJOR_ROOT State right after parser a root value has been finished, but next token has not yet been recognized. | |
| MINOR_FIELD_NAME_2BYTE | back to summary |
|---|---|
| protected static final int MINOR_FIELD_NAME_2BYTE | |
| MINOR_FIELD_NAME_LONG | back to summary |
|---|---|
| protected static final int MINOR_FIELD_NAME_LONG | |
| MINOR_FIELD_NAME_SHORT_ASCII | back to summary |
|---|---|
| protected static final int MINOR_FIELD_NAME_SHORT_ASCII | |
| MINOR_FIELD_NAME_SHORT_UNICODE | back to summary |
|---|---|
| protected static final int MINOR_FIELD_NAME_SHORT_UNICODE | |
| MINOR_HEADER_INITIAL | back to summary |
|---|---|
| protected static final int MINOR_HEADER_INITIAL | |
| MINOR_HEADER_INLINE | back to summary |
|---|---|
| protected static final int MINOR_HEADER_INLINE | |
| MINOR_VALUE_BINARY_7BIT_BODY | back to summary |
|---|---|
| protected static final int MINOR_VALUE_BINARY_7BIT_BODY | |
| MINOR_VALUE_BINARY_7BIT_LEN | back to summary |
|---|---|
| protected static final int MINOR_VALUE_BINARY_7BIT_LEN | |
| MINOR_VALUE_BINARY_RAW_BODY | back to summary |
|---|---|
| protected static final int MINOR_VALUE_BINARY_RAW_BODY | |
| MINOR_VALUE_BINARY_RAW_LEN | back to summary |
|---|---|
| protected static final int MINOR_VALUE_BINARY_RAW_LEN | |
| MINOR_VALUE_NUMBER_BIGDEC_BODY | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_BIGDEC_BODY | |
| MINOR_VALUE_NUMBER_BIGDEC_LEN | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_BIGDEC_LEN | |
| MINOR_VALUE_NUMBER_BIGDEC_SCALE | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_BIGDEC_SCALE | |
| MINOR_VALUE_NUMBER_BIGINT_BODY | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_BIGINT_BODY | |
| MINOR_VALUE_NUMBER_BIGINT_LEN | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_BIGINT_LEN | |
| MINOR_VALUE_NUMBER_DOUBLE | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_DOUBLE | |
| MINOR_VALUE_NUMBER_FLOAT | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_FLOAT | |
| MINOR_VALUE_NUMBER_INT | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_INT | |
| MINOR_VALUE_NUMBER_LONG | back to summary |
|---|---|
| protected static final int MINOR_VALUE_NUMBER_LONG | |
| MINOR_VALUE_STRING_LONG_ASCII | back to summary |
|---|---|
| protected static final int MINOR_VALUE_STRING_LONG_ASCII | |
| MINOR_VALUE_STRING_LONG_UNICODE | back to summary |
|---|---|
| protected static final int MINOR_VALUE_STRING_LONG_UNICODE | |
| MINOR_VALUE_STRING_SHARED_2BYTE | back to summary |
|---|---|
| protected static final int MINOR_VALUE_STRING_SHARED_2BYTE | |
| MINOR_VALUE_STRING_SHORT_ASCII | back to summary |
|---|---|
| protected static final int MINOR_VALUE_STRING_SHORT_ASCII | |
| MINOR_VALUE_STRING_SHORT_UNICODE | back to summary |
|---|---|
| protected static final int MINOR_VALUE_STRING_SHORT_UNICODE | |
| NonBlockingParserBase | back to summary |
|---|---|
protected NonBlockingParserBase(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym)
| |
| _addDecodedToSymbols | back to summary |
|---|---|
| protected final String _addDecodedToSymbols(int len, String name) throws IOException | |
| _addSeenStringValue | back to summary |
|---|---|
| protected final void _addSeenStringValue(String v) throws IOException | |
| _closeArrayScope | back to summary |
|---|---|
| protected final JsonToken _closeArrayScope() throws IOException | |
| _closeInput | back to summary |
|---|---|
| protected void _closeInput() throws IOException Implements abstract com.
| |
| _closeObjectScope | back to summary |
|---|---|
| protected final JsonToken _closeObjectScope() throws IOException | |
| _eofAsNextToken | back to summary |
|---|---|
| protected final JsonToken _eofAsNextToken() throws IOException Helper method called at point when all input has been exhausted and input feeder has indicated no more input will be forthcoming. | |
| _expandSeenNames | back to summary |
|---|---|
| protected final String[] _expandSeenNames(String[] oldShared) Method called to try to expand shared name area to fit one more potentially shared String. If area is already at its biggest size, will just clear the area (by setting next-offset to 0) | |
| _expandSeenStringValues | back to summary |
|---|---|
| private final void _expandSeenStringValues(String v) | |
| _findDecodedFromSymbols | back to summary |
|---|---|
| protected final String _findDecodedFromSymbols(byte[] inBuf, int inPtr, int len) throws IOException | |
| _findDecodedLonger | back to summary |
|---|---|
| private final String _findDecodedLonger(byte[] inBuf, int inPtr, int len) throws IOException | |
| _handleSharedName | back to summary |
|---|---|
| protected final JsonToken _handleSharedName(int index) throws IOException | |
| _handleSharedString | back to summary |
|---|---|
| protected final JsonToken _handleSharedString(int index) throws IOException | |
| _initByteArrayBuilder | back to summary |
|---|---|
| public void _initByteArrayBuilder() | |
| _parseNumericValue | back to summary |
|---|---|
| protected void _parseNumericValue() throws IOException Implements abstract com.
| |
| _releaseBuffers2 | back to summary |
|---|---|
| protected void _releaseBuffers2() Implements abstract com. Method called to release internal buffers owned by the base
reader. This may be called along with
| |
| _reportInvalidInitial | back to summary |
|---|---|
| protected void _reportInvalidInitial(int mask) throws JsonParseException | |
| _reportInvalidOther | back to summary |
|---|---|
| protected void _reportInvalidOther(int mask, int ptr) throws JsonParseException | |
| _reportInvalidSharedName | back to summary |
|---|---|
| protected void _reportInvalidSharedName(int index) throws IOException | |
| _reportInvalidSharedStringValue | back to summary |
|---|---|
| protected void _reportInvalidSharedStringValue(int index) throws IOException | |
| _reportMissingHeader | back to summary |
|---|---|
| protected void _reportMissingHeader(int unmaskedFirstByte) throws IOException | |
| _startArrayScope | back to summary |
|---|---|
| protected final JsonToken _startArrayScope() throws IOException | |
| _startObjectScope | back to summary |
|---|---|
| protected final JsonToken _startObjectScope() throws IOException | |
| _valueComplete | back to summary |
|---|---|
| protected final JsonToken _valueComplete(JsonToken t) throws IOException | |
| canParseAsync | back to summary |
|---|---|
| public boolean canParseAsync() Overrides com. Doc from com. Method that can be called to determine if this parser instance
uses non-blocking ("asynchronous") input access for decoding or not.
Access mode is determined by earlier calls via
If non-blocking decoding is (@code true}, it is possible to call
| |
| getBinaryValue | back to summary |
|---|---|
| public byte[] getBinaryValue(Base64Variant b64variant) throws IOException Implements abstract com. Doc from com. Method that can be used to read (and consume -- results
may not be accessible using other methods after the call)
base64-encoded binary data
included in the current textual JSON value.
It works similar to getting String value via Note that non-decoded textual contents of the current token are not guaranteed to be accessible after this method is called. Current implementation, for example, clears up textual content during decoding. Decoded binary content, however, will be retained until parser is advanced to the next event.
| |
| getCodec | back to summary |
|---|---|
| public ObjectCodec getCodec() Implements abstract com. Doc from com. Accessor for
| |
| getEmbeddedObject | back to summary |
|---|---|
| public Object getEmbeddedObject() throws IOException Overrides com. Doc from com. Accessor that can be called if (and only if) the current token
is Note only some specialized parser implementations support
embedding of objects (usually ones that are facades on top
of non-streaming sources, such as object trees). One exception
is access to binary content (whether via base64 encoding or not)
which typically is accessible using this method, as well as
| |
| getInputSource | back to summary |
|---|---|
| public Object getInputSource() Overrides com. Doc from com. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
In general use of this accessor should be considered as "last effort", i.e. only used if no other mechanism is applicable. | |
| getText | back to summary |
|---|---|
| public String getText() throws IOException Implements abstract com. Method for accessing textual representation of the current event;
if no current event (before first call to
| |
| getText | back to summary |
|---|---|
| public int getText(Writer w) throws IOException Overrides com. Doc from com. Method to read the textual representation of the current token in chunks and pass it to the given Writer. Conceptually same as calling: writer.write(parser.getText());but should typically be more efficient as longer content does need to be combined into a single String to return, and write
can occur directly from intermediate buffers Jackson uses.Note textual content will still be buffered (usually
using
| |
| getTextCharacters | back to summary |
|---|---|
| public char[] getTextCharacters() throws IOException Implements abstract com. Doc from com. Method similar to
Note that caller MUST NOT modify the returned character array in any way -- doing so may corrupt current parser state and render parser instance useless.
The only reason to call this method (over
| |
| getTextLength | back to summary |
|---|---|
| public int getTextLength() throws IOException Implements abstract com. Doc from com. Accessor used with
| |
| getTextOffset | back to summary |
|---|---|
| public int getTextOffset() throws IOException Implements abstract com. Doc from com. Accessor used with
| |
| hasTextCharacters | back to summary |
|---|---|
| public boolean hasTextCharacters() Implements abstract com. Doc from com. Method that can be used to determine whether calling of
Default implementation simply returns false since only actual implementation class has knowledge of its internal buffering state. Implementations are strongly encouraged to properly override this method, to allow efficient copying of content by other code.
| |
| readBinaryValue | back to summary |
|---|---|
| public int readBinaryValue(Base64Variant b64variant, OutputStream out) throws IOException Overrides com. Doc from com. Similar to
| |
| releaseBuffered | back to summary |
|---|---|
| public abstract int releaseBuffered(OutputStream out) throws IOException Overrides 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.
| |
| setCodec | back to summary |
|---|---|
| public void setCodec(ObjectCodec c) Implements abstract com. Doc from com. Setter that allows defining
| |
| symbolTableForTests | back to summary |
|---|---|
| protected ByteQuadsCanonicalizer symbolTableForTests() | |