Top Fields Constructors Methods
com.fasterxml.jackson.dataformat.smile.async

public abstract Class NonBlockingParserBase

extends SmileParserBase
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.dataformat.smile.async.NonBlockingByteArrayParser
Imports
java.io.*, java.util.Arrays, com.fasterxml.jackson.core.*, com.fasterxml.jackson.core.io.IOContext, com.fasterxml.jackson.core.json.JsonReadContext, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer, com.fasterxml.jackson.core.util.ByteArrayBuilder, com.fasterxml.jackson.dataformat.smile.*

Field Summary

Modifier and TypeField 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 _inputCopy

protected int
_majorState

Current main decoding state

protected int
_majorStateAfterValue

Value of _majorState after completing a scalar value

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
Inherited from com.fasterxml.jackson.dataformat.smile.SmileParserBase:
_binaryValue_closed_currInputProcessed_formatFeatures_inputEnd_inputPtr_ioContext_mayContainRawBinary_nameCopied_nameCopyBuffer_numberBigDecimal_numberBigInt_numberDouble_numberFloat_numberInt_numberLong_numberType_numTypesValid_quad1_quad2_quad3_quadBuffer_seenNameCount_seenNames_seenStringValueCount_seenStringValues_streamReadContext_symbols_symbolsCanonical_textBuffer_tokenOffsetForTotalDEFAULT_NAME_BUFFER_LENGTHDEFAULT_STRING_VALUE_BUFFER_LENGTHLONGEST_NON_CHUNKED_BINARYNO_STRINGSSMILE_READ_CAPABILITIES

Constructor Summary

AccessConstructor and Description
protected
NonBlockingParserBase(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym)

Method Summary

Modifier and TypeMethod and Description
protected final String
protected final void
protected final JsonToken
protected void
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
_findDecodedFromSymbols(byte[] inBuf, int inPtr, int len)

private final String
_findDecodedLonger(byte[] inBuf, int inPtr, int len)

protected final JsonToken
_handleSharedName(int index)

protected final JsonToken
public void
protected void
protected void
_releaseBuffers2()

Implements abstract com.fasterxml.jackson.dataformat.smile.SmileParserBase._releaseBuffers2.

Method called to release internal buffers owned by the base reader.

protected void
protected void
_reportInvalidOther(int mask, int ptr)

protected void
protected void
protected void
_reportMissingHeader(int unmaskedFirstByte)

protected final JsonToken
protected final JsonToken
protected final JsonToken
public boolean
canParseAsync()

Overrides com.fasterxml.jackson.core.JsonParser.canParseAsync.

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 Base64Variants for definitions of "standard" variants).
b64variant
)

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getBinaryValue.

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.fasterxml.jackson.core.JsonParser.getCodec.

Accessor for ObjectCodec associated with this parser, if any.

public Object
getEmbeddedObject()

Overrides com.fasterxml.jackson.core.JsonParser.getEmbeddedObject.

Accessor that can be called if (and only if) the current token is JsonToken#VALUE_EMBEDDED_OBJECT.

public Object
getInputSource()

Overrides com.fasterxml.jackson.core.JsonParser.getInputSource.

Method that can be used to get access to object that is used to access input being parsed; this is usually either InputStream or Reader, depending on what parser was constructed with.

public String
getText()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getText.

Method for accessing textual representation of the current event; if no current event (before first call to nextToken, or after encountering end-of-input), returns null.

public int
getText(Writer
Writer to write textual content to
w
)

Overrides com.fasterxml.jackson.core.JsonParser.getText.

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.fasterxml.jackson.core.base.ParserMinimalBase.getTextCharacters.

Method similar to getText, but that will return underlying (unmodifiable) character array that contains textual value, instead of constructing a String object to contain this information.

public int
getTextLength()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextLength.

Accessor used with getTextCharacters, to know length of String stored in returned buffer.

public int
getTextOffset()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextOffset.

Accessor used with getTextCharacters, to know offset of the first text content character within buffer.

public boolean
hasTextCharacters()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.hasTextCharacters.

Method that can be used to determine whether calling of getTextCharacters would be the most efficient way to access textual content for the event parser currently points to.

public int
readBinaryValue(Base64Variant
base64 variant to use
b64variant
,
OutputStream
Output stream to use for passing decoded binary data
out
)

Overrides com.fasterxml.jackson.core.JsonParser.readBinaryValue.

Similar to readBinaryValue(OutputStream) but allows explicitly specifying base64 variant to use.

public abstract int
releaseBuffered(OutputStream
OutputStream to which buffered, undecoded content is written to
out
)

Overrides com.fasterxml.jackson.core.JsonParser.releaseBuffered.

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; null if none
c
)

Implements abstract com.fasterxml.jackson.core.JsonParser.setCodec.

Setter that allows defining ObjectCodec associated with this parser, if any.

protected ByteQuadsCanonicalizer
Inherited from com.fasterxml.jackson.dataformat.smile.SmileParserBase:
_handleEOF_releaseBuffers_reportMismatchedEndMarker_sourceReferencecloseconvertNumberToBigDecimalconvertNumberToBigIntegerconvertNumberToDoubleconvertNumberToFloatconvertNumberToIntconvertNumberToLongcurrentLocationcurrentNamecurrentTokenLocationgetBigIntegerValuegetCurrentLocationgetCurrentNamegetDecimalValuegetDoubleValuegetFloatValuegetFormatFeaturesgetIntValuegetLongValuegetNumberTypegetNumberTypeFPgetNumberValuegetNumberValueExactgetParsingContextgetReadCapabilitiesgetTokenLocationisClosedisNaNmayContainRawBinaryoverrideCurrentNameoverrideFormatFeaturesversion

Field Detail

_byteArrayBuilderback to summary
protected ByteArrayBuilder _byteArrayBuilder

ByteArrayBuilder is needed if 'getBinaryValue' is called. If so, we better reuse it for remainder of content.

_endOfInputback to summary
protected boolean _endOfInput

Flag that is sent when calling application indicates that there will be no more input to parse.

_inputCopyback to summary
protected byte[] _inputCopy

Temporary buffer for holding content if input not contiguous (but can fit in buffer)

_inputCopyLenback to summary
protected int _inputCopyLen

Number of bytes buffered in _inputCopy

_majorStateback to summary
protected int _majorState

Current main decoding state

_majorStateAfterValueback to summary
protected int _majorStateAfterValue

Value of _majorState after completing a scalar value

_minorStateback to summary
protected int _minorState

Addition indicator within state; contextually relevant for just that state

_pending32back to summary
protected int _pending32

Temporary storage for 32-bit values (int, float), as well as length markers for length-prefixed values.

_pending64back 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_ELEMENTback to summary
protected static final int MAJOR_ARRAY_ELEMENT
MAJOR_CLOSEDback 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_INITIALback 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_FIELDback to summary
protected static final int MAJOR_OBJECT_FIELD
MAJOR_OBJECT_VALUEback to summary
protected static final int MAJOR_OBJECT_VALUE
MAJOR_ROOTback 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_2BYTEback to summary
protected static final int MINOR_FIELD_NAME_2BYTE
MINOR_FIELD_NAME_LONGback to summary
protected static final int MINOR_FIELD_NAME_LONG
MINOR_FIELD_NAME_SHORT_ASCIIback to summary
protected static final int MINOR_FIELD_NAME_SHORT_ASCII
MINOR_FIELD_NAME_SHORT_UNICODEback to summary
protected static final int MINOR_FIELD_NAME_SHORT_UNICODE
MINOR_HEADER_INITIALback to summary
protected static final int MINOR_HEADER_INITIAL
MINOR_HEADER_INLINEback to summary
protected static final int MINOR_HEADER_INLINE
MINOR_VALUE_BINARY_7BIT_BODYback to summary
protected static final int MINOR_VALUE_BINARY_7BIT_BODY
MINOR_VALUE_BINARY_7BIT_LENback to summary
protected static final int MINOR_VALUE_BINARY_7BIT_LEN
MINOR_VALUE_BINARY_RAW_BODYback to summary
protected static final int MINOR_VALUE_BINARY_RAW_BODY
MINOR_VALUE_BINARY_RAW_LENback to summary
protected static final int MINOR_VALUE_BINARY_RAW_LEN
MINOR_VALUE_NUMBER_BIGDEC_BODYback to summary
protected static final int MINOR_VALUE_NUMBER_BIGDEC_BODY
MINOR_VALUE_NUMBER_BIGDEC_LENback to summary
protected static final int MINOR_VALUE_NUMBER_BIGDEC_LEN
MINOR_VALUE_NUMBER_BIGDEC_SCALEback to summary
protected static final int MINOR_VALUE_NUMBER_BIGDEC_SCALE
MINOR_VALUE_NUMBER_BIGINT_BODYback to summary
protected static final int MINOR_VALUE_NUMBER_BIGINT_BODY
MINOR_VALUE_NUMBER_BIGINT_LENback to summary
protected static final int MINOR_VALUE_NUMBER_BIGINT_LEN
MINOR_VALUE_NUMBER_DOUBLEback to summary
protected static final int MINOR_VALUE_NUMBER_DOUBLE
MINOR_VALUE_NUMBER_FLOATback to summary
protected static final int MINOR_VALUE_NUMBER_FLOAT
MINOR_VALUE_NUMBER_INTback to summary
protected static final int MINOR_VALUE_NUMBER_INT
MINOR_VALUE_NUMBER_LONGback to summary
protected static final int MINOR_VALUE_NUMBER_LONG
MINOR_VALUE_STRING_LONG_ASCIIback to summary
protected static final int MINOR_VALUE_STRING_LONG_ASCII
MINOR_VALUE_STRING_LONG_UNICODEback to summary
protected static final int MINOR_VALUE_STRING_LONG_UNICODE
MINOR_VALUE_STRING_SHARED_2BYTEback to summary
protected static final int MINOR_VALUE_STRING_SHARED_2BYTE
MINOR_VALUE_STRING_SHORT_ASCIIback to summary
protected static final int MINOR_VALUE_STRING_SHORT_ASCII
MINOR_VALUE_STRING_SHORT_UNICODEback to summary
protected static final int MINOR_VALUE_STRING_SHORT_UNICODE

Constructor Detail

NonBlockingParserBaseback to summary
protected NonBlockingParserBase(IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym)
Since
2.16

Method Detail

_addDecodedToSymbolsback to summary
protected final String _addDecodedToSymbols(int len, String name) throws IOException
_addSeenStringValueback to summary
protected final void _addSeenStringValue(String v) throws IOException
_closeArrayScopeback to summary
protected final JsonToken _closeArrayScope() throws IOException
_closeInputback to summary
protected void _closeInput() throws IOException

Implements abstract com.fasterxml.jackson.dataformat.smile.SmileParserBase._closeInput.

Annotations
@Override
_closeObjectScopeback to summary
protected final JsonToken _closeObjectScope() throws IOException
_eofAsNextTokenback 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.

_expandSeenNamesback 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)

_expandSeenStringValuesback to summary
private final void _expandSeenStringValues(String v)
_findDecodedFromSymbolsback to summary
protected final String _findDecodedFromSymbols(byte[] inBuf, int inPtr, int len) throws IOException
_findDecodedLongerback to summary
private final String _findDecodedLonger(byte[] inBuf, int inPtr, int len) throws IOException
_handleSharedNameback to summary
protected final JsonToken _handleSharedName(int index) throws IOException
_handleSharedStringback to summary
protected final JsonToken _handleSharedString(int index) throws IOException
_initByteArrayBuilderback to summary
public void _initByteArrayBuilder()
_parseNumericValueback to summary
protected void _parseNumericValue() throws IOException

Implements abstract com.fasterxml.jackson.dataformat.smile.SmileParserBase._parseNumericValue.

Annotations
@Override
_releaseBuffers2back to summary
protected void _releaseBuffers2()

Implements abstract com.fasterxml.jackson.dataformat.smile.SmileParserBase._releaseBuffers2.

Method called to release internal buffers owned by the base reader. This may be called along with _closeInput (for example, when explicitly closing this reader instance), or separately (if need be).

Annotations
@Override
_reportInvalidInitialback to summary
protected void _reportInvalidInitial(int mask) throws JsonParseException
_reportInvalidOtherback to summary
protected void _reportInvalidOther(int mask, int ptr) throws JsonParseException
_reportInvalidSharedNameback to summary
protected void _reportInvalidSharedName(int index) throws IOException
_reportInvalidSharedStringValueback to summary
protected void _reportInvalidSharedStringValue(int index) throws IOException
_reportMissingHeaderback to summary
protected void _reportMissingHeader(int unmaskedFirstByte) throws IOException
_startArrayScopeback to summary
protected final JsonToken _startArrayScope() throws IOException
_startObjectScopeback to summary
protected final JsonToken _startObjectScope() throws IOException
_valueCompleteback to summary
protected final JsonToken _valueComplete(JsonToken t) throws IOException
canParseAsyncback to summary
public boolean canParseAsync()

Overrides com.fasterxml.jackson.core.JsonParser.canParseAsync.

Doc from com.fasterxml.jackson.core.JsonParser.canParseAsync.

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 JsonFactory; it may not be changed after construction.

If non-blocking decoding is (@code true}, it is possible to call getNonBlockingInputFeeder() to obtain object to use for feeding input; otherwise (false returned) input is read by blocking

Returns:boolean

True if this is a non-blocking ("asynchronous") parser

Annotations
@Override
Since
2.9
getBinaryValueback to summary
public byte[] getBinaryValue(Base64Variant b64variant) throws IOException

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getBinaryValue.

Doc from com.fasterxml.jackson.core.JsonParser.getBinaryValue.

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 getText and decoding result (except for decoding part), but should be significantly more performant.

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.

Parameters
b64variant:Base64Variant

Expected variant of base64 encoded content (see Base64Variants for definitions of "standard" variants).

Returns:byte[]

Decoded binary data

Annotations
@Override
Exceptions
IOException:
for low-level read issues, or JsonParseException for decoding problems
getCodecback to summary
public ObjectCodec getCodec()

Implements abstract com.fasterxml.jackson.core.JsonParser.getCodec.

Doc from com.fasterxml.jackson.core.JsonParser.getCodec.

Accessor for ObjectCodec associated with this parser, if any. Codec is used by readValueAs(Class) method (and its variants).

Returns:ObjectCodec

Codec assigned to this parser, if any; null if none

Annotations
@Override
getEmbeddedObjectback to summary
public Object getEmbeddedObject() throws IOException

Overrides com.fasterxml.jackson.core.JsonParser.getEmbeddedObject.

Doc from com.fasterxml.jackson.core.JsonParser.getEmbeddedObject.

Accessor that can be called if (and only if) the current token is JsonToken#VALUE_EMBEDDED_OBJECT. For other token types, null is returned.

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 getBinaryValue().

Returns:Object

Embedded value (usually of "native" type supported by format) for the current token, if any; null otherwise

Annotations
@Override
Exceptions
IOException:
for low-level read issues, or JsonParseException for decoding problems
getInputSourceback to summary
public Object getInputSource()

Overrides com.fasterxml.jackson.core.JsonParser.getInputSource.

Doc from com.fasterxml.jackson.core.JsonParser.getInputSource.

Method that can be used to get access to object that is used to access input being parsed; this is usually either InputStream or Reader, depending on what parser was constructed with. Note that returned value may be null in some cases; including case where parser implementation does not want to exposed raw source to caller. In cases where input has been decorated, object returned here is the decorated version; this allows some level of interaction between users of parser and decorator object.

In general use of this accessor should be considered as "last effort", i.e. only used if no other mechanism is applicable.

Returns:Object

Input source this parser was configured with

Annotations
@Override
getTextback to summary
public String getText() throws IOException

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getText.

Method for accessing textual representation of the current event; if no current event (before first call to nextToken, or after encountering end-of-input), returns null. Method can be called for any event.

Returns:String

Doc from com.fasterxml.jackson.core.JsonParser.getText.

Textual value associated with the current token (one returned by nextToken() or other iteration methods)

Annotations
@Override
Exceptions
IOException:

Doc from com.fasterxml.jackson.core.JsonParser.getText.

for low-level read issues, or JsonParseException for decoding problems, including if the text is too large, see com.fasterxml.jackson.core.StreamReadConstraints.Builder#maxStringLength(int)

getTextback to summary
public int getText(Writer w) throws IOException

Overrides com.fasterxml.jackson.core.JsonParser.getText.

Doc from com.fasterxml.jackson.core.JsonParser.getText.

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 TextBuffer) and will be accessible with other getText() calls (that is, it will not be consumed). So this accessor only avoids construction of java.lang.String compared to plain getText() method.

Parameters
w:Writer

Writer to write textual content to

Returns:int

The number of characters written to the Writer

Annotations
@Override
Exceptions
IOException:
for low-level read issues or writes using passed writer, or JsonParseException for decoding problems
getTextCharactersback to summary
public char[] getTextCharacters() throws IOException

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextCharacters.

Doc from com.fasterxml.jackson.core.JsonParser.getTextCharacters.

Method similar to getText, but that will return underlying (unmodifiable) character array that contains textual value, instead of constructing a String object to contain this information. Note, however, that:

  • Textual contents are not guaranteed to start at index 0 (rather, call getTextOffset) to know the actual offset
  • Length of textual contents may be less than the length of returned buffer: call getTextLength for actual length of returned content.

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 getText) is to avoid construction of a String object (which will make a copy of contents).

Returns:char[]

Buffer that contains the current textual value (but not necessarily at offset 0, and not necessarily until the end of buffer)

Annotations
@Override
Exceptions
IOException:
for low-level read issues, or JsonParseException for decoding problems, including if the text is too large, see com.fasterxml.jackson.core.StreamReadConstraints.Builder#maxStringLength(int)
getTextLengthback to summary
public int getTextLength() throws IOException

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextLength.

Doc from com.fasterxml.jackson.core.JsonParser.getTextLength.

Accessor used with getTextCharacters, to know length of String stored in returned buffer.

Returns:int

Number of characters within buffer returned by getTextCharacters that are part of textual content of the current token.

Annotations
@Override
Exceptions
IOException:
for low-level read issues, or JsonParseException for decoding problems
getTextOffsetback to summary
public int getTextOffset() throws IOException

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextOffset.

Doc from com.fasterxml.jackson.core.JsonParser.getTextOffset.

Accessor used with getTextCharacters, to know offset of the first text content character within buffer.

Returns:int

Offset of the first character within buffer returned by getTextCharacters that is part of textual content of the current token.

Annotations
@Override
Exceptions
IOException:
for low-level read issues, or JsonParseException for decoding problems
hasTextCharactersback to summary
public boolean hasTextCharacters()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.hasTextCharacters.

Doc from com.fasterxml.jackson.core.JsonParser.hasTextCharacters.

Method that can be used to determine whether calling of getTextCharacters would be the most efficient way to access textual content for the event parser currently points to.

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.

Returns:boolean

True if parser currently has character array that can be efficiently returned via getTextCharacters; false means that it may or may not exist

Annotations
@Override
readBinaryValueback to summary
public int readBinaryValue(Base64Variant b64variant, OutputStream out) throws IOException

Overrides com.fasterxml.jackson.core.JsonParser.readBinaryValue.

Doc from com.fasterxml.jackson.core.JsonParser.readBinaryValue.

Similar to readBinaryValue(OutputStream) but allows explicitly specifying base64 variant to use.

Parameters
b64variant:Base64Variant

base64 variant to use

out:OutputStream

Output stream to use for passing decoded binary data

Returns:int

Number of bytes that were decoded and written via OutputStream

Annotations
@Override
Exceptions
IOException:
for low-level read issues, or JsonParseException for decoding problems
releaseBufferedback to summary
public abstract int releaseBuffered(OutputStream out) throws IOException

Overrides com.fasterxml.jackson.core.JsonParser.releaseBuffered.

Doc from com.fasterxml.jackson.core.JsonParser.releaseBuffered.

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.

Parameters
out:OutputStream

OutputStream to which buffered, undecoded content is written to

Returns:int

-1 if the underlying content source is not byte based (that is, input can not be sent to OutputStream; otherwise number of bytes released (0 if there was nothing to release)

Annotations
@Override
Exceptions
IOException:
if write to stream threw exception
setCodecback to summary
public void setCodec(ObjectCodec c)

Implements abstract com.fasterxml.jackson.core.JsonParser.setCodec.

Doc from com.fasterxml.jackson.core.JsonParser.setCodec.

Setter that allows defining ObjectCodec associated with this parser, if any. Codec is used by readValueAs(Class) method (and its variants).

Parameters
c:ObjectCodec

Codec to assign, if any; null if none

Annotations
@Override
symbolTableForTestsback to summary
protected ByteQuadsCanonicalizer symbolTableForTests()