Top Fields Constructors Methods
tools.jackson.dataformat.smile

public abstract Class SmileParserBase

extends ParserMinimalBase
Class Inheritance
Known Direct Subclasses
tools.jackson.dataformat.smile.async.NonBlockingParserBase, tools.jackson.dataformat.smile.SmileParser
Imports
java.math.BigDecimal, .BigInteger, tools.jackson.core.*, tools.jackson.core.base.ParserMinimalBase, tools.jackson.core.exc.StreamReadException, tools.jackson.core.io.IOContext, .ContentReference, tools.jackson.core.json.DupDetector, tools.jackson.core.sym.ByteQuadsCanonicalizer, tools.jackson.core.util.JacksonFeatureSet, .SimpleStreamReadContext, .TextBuffer

Field Summary

Modifier and TypeField and Description
protected byte[]
_binaryValue

We will hold on to decoded binary data, for duration of current event, so that multiple calls to getBinaryValue will not need to decode data more than once.

protected long
_currInputProcessed

Number of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer).

protected int
_formatFeatures

Bit flag composed of bits that indicate which SmileReadFeatures are enabled.

protected int
_inputEnd

Index of character after last available one in the buffer.

protected int
_inputPtr

Pointer to next available character in buffer

protected boolean
_mayContainRawBinary

Flag that indicates whether content can legally have raw (unquoted) binary data.

protected BigDecimal
protected BigInteger
protected double
protected float
protected int
protected long
protected JsonParser.NumberType
protected int
_numTypesValid

Bitfield that indicates which numeric representations have been calculated for the current type

protected int
_quad1

Quads used for hash calculation

protected int
_quad2

Quads used for hash calculation

protected int
_quad3

Quads used for hash calculation

protected int[]
_quadBuffer

Temporary buffer used for name parsing.

protected int
protected String[]
_seenNames

Array of recently seen field names, which may be back referenced by later fields.

protected int
protected String[]
_seenStringValues

Array of recently seen field names, which may be back referenced by later fields Defaults set to disable handling if no header found.

protected SimpleStreamReadContext
_streamReadContext

Information about parser context, context in which the next token is to be parsed (root, array, object).

protected final ByteQuadsCanonicalizer
_symbols

Symbol table that contains field names encountered so far

protected final boolean
_symbolsCanonical

Marker flag to indicate that standard symbol handling is used (one with symbol table assisted canonicalization.

protected final TextBuffer
_textBuffer

Buffer that contains contents of String values, including field names if necessary (name split across boundary, contains escape sequence, or access needed to char array)

protected int
_tokenOffsetForTotal

Alternative to _tokenInputTotal that will only contain offset within input buffer, as int.

protected static final int
protected static final int
protected static final int
protected static final String[]
protected static final JacksonFeatureSet<StreamReadCapability>
Inherited from tools.jackson.core.base.ParserMinimalBase:
_closed_currToken_ioContext_lastClearedToken_objectReadContext_streamReadConstraints_streamReadFeatures_tokenCount_trackMaxTokenCountBD_MAX_INTBD_MAX_LONGBD_MIN_INTBD_MIN_LONGBI_MAX_INTBI_MAX_LONGBI_MIN_INTBI_MIN_LONGCHAR_NULLINT_0INT_9INT_APOSINT_ASTERISKINT_BACKSLASHINT_COLONINT_COMMAINT_CRINT_eINT_EINT_HASHINT_LBRACKETINT_LCURLYINT_LFINT_MINUSINT_PERIODINT_PLUSINT_QUOTEINT_RBRACKETINT_RCURLYINT_RSINT_SLASHINT_SPACEINT_TABMAX_BYTE_IMAX_INT_DMAX_INT_LMAX_LONG_DMAX_SHORT_IMIN_BYTE_IMIN_INT_DMIN_INT_LMIN_LONG_DMIN_SHORT_INO_BYTESNO_INTSNR_BIGDECIMALNR_BIGINTNR_DOUBLENR_FLOATNR_INTNR_LONGNR_UNKNOWNSTREAM_READ_FEATURE_DEFAULTS

Constructor Summary

AccessConstructor and Description
public
SmileParserBase(ObjectReadContext readCtxt, IOContext ioCtxt, int parserFeatures, int formatFeatures, ByteQuadsCanonicalizer sym)

Method Summary

Modifier and TypeMethod and Description
protected abstract void
_closeInput()

Implements abstract tools.jackson.core.base.ParserMinimalBase._closeInput.

Abstract method for sub-classes to implement; to be called by close() implementation here.

protected void
_handleEOF()

Implements abstract tools.jackson.core.base.ParserMinimalBase._handleEOF.

Method called when an EOF is encountered between tokens.

protected abstract void
_parseNumericValue()

Method called to complete parsing of a numeric value: will throw StreamReadException if current token is not numeric.

protected abstract boolean

Returns:

true if current token is numeric; false otherwise
_parseNumericValueIfNumber
()

Similar to _parseNumericValue(), but will not throw exception if the current token is not a numeric value.

protected final void
_releaseBuffers()

Implements abstract tools.jackson.core.base.ParserMinimalBase._releaseBuffers.

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

protected abstract void
protected void
_reportMismatchedEndMarker(int actCh, char expCh)

protected ContentReference
_sourceReference()

Helper method used to encapsulate logic of including (or not) of "source reference" when constructing TokenStreamLocation instances.

public void
assignCurrentValue(Object v)

Implements abstract tools.jackson.core.JsonParser.assignCurrentValue.

Helper method, usually equivalent to: getParsingContext().assignCurrentValue(v);

public final void
close()

Overrides tools.jackson.core.base.ParserMinimalBase.close.

Implements java.io.Closeable.close.

Closes the parser so that no further iteration or data access can be made; will also close the underlying input source if parser either owns the input source, or feature StreamReadFeature#AUTO_CLOSE_SOURCE is enabled.

protected final void
protected final void
protected final void
protected final void
protected final void
protected final void
public final TokenStreamLocation
currentLocation()

Implements abstract tools.jackson.core.JsonParser.currentLocation.

Overridden since we do not really have character-based locations, but we do have byte offset to specify.

public final String
currentName()

Implements abstract tools.jackson.core.JsonParser.currentName.

Method that can be called to get the name associated with the current event.

public final TokenStreamLocation
currentTokenLocation()

Implements abstract tools.jackson.core.JsonParser.currentTokenLocation.

Overridden since we do not really have character-based locations, but we do have byte offset to specify.

public Object
currentValue()

Implements abstract tools.jackson.core.JsonParser.currentValue.

Helper method, usually equivalent to: getParsingContext().currentValue();

Note that "current value" is NOT populated (or used) by Streaming parser; it is only used by higher-level data-binding functionality.

public final BigInteger
getBigIntegerValue()

Implements abstract tools.jackson.core.JsonParser.getBigIntegerValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it cannot be used as a Java long primitive type due to its magnitude.

public final BigDecimal
getDecimalValue()

Implements abstract tools.jackson.core.JsonParser.getDecimalValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT or JsonToken#VALUE_NUMBER_INT.

public final double
getDoubleValue()

Implements abstract tools.jackson.core.JsonParser.getDoubleValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java double primitive type.

public final float
getFloatValue()

Implements abstract tools.jackson.core.JsonParser.getFloatValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java float primitive type.

public final int
getIntValue()

Implements abstract tools.jackson.core.JsonParser.getIntValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a value of Java int primitive type.

public final long
getLongValue()

Implements abstract tools.jackson.core.JsonParser.getLongValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a Java long primitive type.

public final JsonParser.NumberType
getNumberType()

Implements abstract tools.jackson.core.JsonParser.getNumberType.

If current token is of type JsonToken#VALUE_NUMBER_INT or JsonToken#VALUE_NUMBER_FLOAT, returns one of NumberType constants; otherwise returns null.

public JsonParser.NumberTypeFP
getNumberTypeFP()

Overrides tools.jackson.core.base.ParserMinimalBase.getNumberTypeFP.

If current token is of type JsonToken#VALUE_NUMBER_FLOAT, returns one of NumberTypeFP constants; otherwise returns NumberTypeFP#UNKNOWN.

public final Number
getNumberValue()

Implements abstract tools.jackson.core.JsonParser.getNumberValue.

Generic number value accessor method that will work for all kinds of numeric values.

public final Number
getNumberValueExact()

Overrides tools.jackson.core.base.ParserMinimalBase.getNumberValueExact.

Method similar to getNumberValue with the difference that for floating-point numbers value returned may be BigDecimal if the underlying format does not store floating-point numbers using native representation: for example, textual formats represent numbers as Strings (which are 10-based), and conversion to java.lang.Double is potentially lossy operation.

public final boolean
isClosed()

Overrides tools.jackson.core.base.ParserMinimalBase.isClosed.

Method that can be called to determine whether this parser is closed or not.

public final boolean
isNaN()

Implements abstract tools.jackson.core.JsonParser.isNaN.

Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!).

public final boolean
public JacksonFeatureSet<StreamReadCapability>
streamReadCapabilities()

Overrides tools.jackson.core.base.ParserMinimalBase.streamReadCapabilities.

Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly).

public final SimpleStreamReadContext
streamReadContext()

Implements abstract tools.jackson.core.JsonParser.streamReadContext.

Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information.

public final Version
version()

Implements abstract tools.jackson.core.JsonParser.version.

Implements tools.jackson.core.Versioned.version.

Accessor for getting version of the core package, given a parser instance.

Inherited from tools.jackson.core.base.ParserMinimalBase:
_constructInputCoercion_constructNotNumericType_currentLocationMinusOne_decodeBase64_getCharDesc_hasTextualNull_longIntegerDesc_longNumberDesc_nullSafeUpdateToken_reportBadInputStream_reportBadReader_reportError_reportError_reportError_reportError_reportInvalidEOF_reportInvalidEOF_reportInvalidEOFInValue_reportInvalidNumber_reportInvalidSpace_reportMissingRootWS_reportOverflowByte_reportOverflowInt_reportOverflowInt_reportOverflowInt_reportOverflowLong_reportOverflowLong_reportOverflowLong_reportOverflowShort_reportUnexpectedChar_reportUnexpectedNumberChar_throwInternal_updateToken_updateTokenToNA_updateTokenToNull_wrapIOFailureclearCurrentTokencurrentNameMatchcurrentTokencurrentTokenCountcurrentTokenIdfinishTokengetBooleanValuegetByteValuegetEmbeddedObjectgetLastClearedTokengetNumberValueDeferredgetShortValuegetStringgetValueAsBooleangetValueAsDoublegetValueAsIntgetValueAsIntgetValueAsLonggetValueAsLonggetValueAsStringgetValueAsStringhasCurrentTokenhasTokenhasTokenIdisEnabledisExpectedNumberIntTokenisExpectedStartArrayTokenisExpectedStartObjectTokennextNamenextNamenextNameMatchnextValueobjectReadContextreadValueAsreadValueAsreadValueAsreadValueAsTreeskipChildrenstreamReadConstraintsstreamReadFeatures

Field Detail

_binaryValueback to summary
protected byte[] _binaryValue

We will hold on to decoded binary data, for duration of current event, so that multiple calls to getBinaryValue will not need to decode data more than once.

_currInputProcessedback to summary
protected long _currInputProcessed

Number of characters/bytes that were contained in previous blocks (blocks that were already processed prior to the current buffer).

_formatFeaturesback to summary
protected int _formatFeatures

Bit flag composed of bits that indicate which SmileReadFeatures are enabled.

Note

currently the only feature (SmileReadFeature#REQUIRE_HEADER takes effect during bootstrapping.

_inputEndback to summary
protected int _inputEnd

Index of character after last available one in the buffer.

_inputPtrback to summary
protected int _inputPtr

Pointer to next available character in buffer

_mayContainRawBinaryback to summary
protected boolean _mayContainRawBinary

Flag that indicates whether content can legally have raw (unquoted) binary data. Since this information is included both in header and in actual binary data blocks there is redundancy, and we want to ensure settings are compliant. Using application may also want to know this setting in case it does some direct (random) access.

_numberBigDecimalback to summary
protected BigDecimal _numberBigDecimal
_numberBigIntback to summary
protected BigInteger _numberBigInt
_numberDoubleback to summary
protected double _numberDouble
_numberFloatback to summary
protected float _numberFloat
_numberIntback to summary
protected int _numberInt
_numberLongback to summary
protected long _numberLong
_numberTypeback to summary
protected JsonParser.NumberType _numberType
_numTypesValidback to summary
protected int _numTypesValid

Bitfield that indicates which numeric representations have been calculated for the current type

_quad1back to summary
protected int _quad1

Quads used for hash calculation

_quad2back to summary
protected int _quad2

Quads used for hash calculation

_quad3back to summary
protected int _quad3

Quads used for hash calculation

_quadBufferback to summary
protected int[] _quadBuffer

Temporary buffer used for name parsing.

_seenNameCountback to summary
protected int _seenNameCount
_seenNamesback to summary
protected String[] _seenNames

Array of recently seen field names, which may be back referenced by later fields. Defaults set to enable handling even if no header found.

_seenStringValueCountback to summary
protected int _seenStringValueCount
_seenStringValuesback to summary
protected String[] _seenStringValues

Array of recently seen field names, which may be back referenced by later fields Defaults set to disable handling if no header found.

_streamReadContextback to summary
protected SimpleStreamReadContext _streamReadContext

Information about parser context, context in which the next token is to be parsed (root, array, object).

_symbolsback to summary
protected final ByteQuadsCanonicalizer _symbols

Symbol table that contains field names encountered so far

_symbolsCanonicalback to summary
protected final boolean _symbolsCanonical

Marker flag to indicate that standard symbol handling is used (one with symbol table assisted canonicalization. May be disabled in which case alternate stream-line, non-canonicalizing handling is used: usually due to set of symbols (Object property names) is unbounded and will not benefit from canonicalization attempts.

_textBufferback to summary
protected final TextBuffer _textBuffer

Buffer that contains contents of String values, including field names if necessary (name split across boundary, contains escape sequence, or access needed to char array)

_tokenOffsetForTotalback to summary
protected int _tokenOffsetForTotal

Alternative to _tokenInputTotal that will only contain offset within input buffer, as int.

DEFAULT_NAME_BUFFER_LENGTHback to summary
protected static final int DEFAULT_NAME_BUFFER_LENGTH
DEFAULT_STRING_VALUE_BUFFER_LENGTHback to summary
protected static final int DEFAULT_STRING_VALUE_BUFFER_LENGTH
LONGEST_NON_CHUNKED_BINARYback to summary
protected static final int LONGEST_NON_CHUNKED_BINARY
NO_STRINGSback to summary
protected static final String[] NO_STRINGS
SMILE_READ_CAPABILITIESback to summary
protected static final JacksonFeatureSet<StreamReadCapability> SMILE_READ_CAPABILITIES

Constructor Detail

SmileParserBaseback to summary
public SmileParserBase(ObjectReadContext readCtxt, IOContext ioCtxt, int parserFeatures, int formatFeatures, ByteQuadsCanonicalizer sym)

Method Detail

_closeInputback to summary
protected abstract void _closeInput() throws JacksonException

Implements abstract tools.jackson.core.base.ParserMinimalBase._closeInput.

Doc from tools.jackson.core.base.ParserMinimalBase._closeInput.

Abstract method for sub-classes to implement; to be called by close() implementation here.

Annotations
@Override
_handleEOFback to summary
protected void _handleEOF() throws StreamReadException

Implements abstract tools.jackson.core.base.ParserMinimalBase._handleEOF.

Method called when an EOF is encountered between tokens. If so, it may be a legitimate EOF, but only iff there is no open non-root context.

Annotations
@Override
_parseNumericValueback to summary
protected abstract void _parseNumericValue() throws JacksonException

Method called to complete parsing of a numeric value: will throw StreamReadException if current token is not numeric.

Exceptions
StreamReadException:
if current token is not numeric
_parseNumericValueIfNumberback to summary
protected abstract boolean _parseNumericValueIfNumber() throws JacksonException

Similar to _parseNumericValue(), but will not throw exception if the current token is not a numeric value.

Returns:boolean

true if current token is numeric; false otherwise

_releaseBuffersback to summary
protected final void _releaseBuffers()

Implements abstract tools.jackson.core.base.ParserMinimalBase._releaseBuffers.

Doc from tools.jackson.core.base.ParserMinimalBase._releaseBuffers.

Method called to release internal buffers owned by the base reader. This is expected to be called after _closeInput since the buffers are expected not to be needed any longer.

Annotations
@Override
_releaseBuffers2back to summary
protected abstract void _releaseBuffers2()
_reportMismatchedEndMarkerback to summary
protected void _reportMismatchedEndMarker(int actCh, char expCh) throws StreamReadException
_sourceReferenceback to summary
protected ContentReference _sourceReference()

Helper method used to encapsulate logic of including (or not) of "source reference" when constructing TokenStreamLocation instances.

assignCurrentValueback to summary
public void assignCurrentValue(Object v)

Implements abstract tools.jackson.core.JsonParser.assignCurrentValue.

Doc from tools.jackson.core.JsonParser.assignCurrentValue.

Helper method, usually equivalent to: getParsingContext().assignCurrentValue(v);

Annotations
@Override
closeback to summary
public final void close() throws JacksonException

Overrides tools.jackson.core.base.ParserMinimalBase.close.

Implements java.io.Closeable.close.

Doc from tools.jackson.core.JsonParser.close.

Closes the parser so that no further iteration or data access can be made; will also close the underlying input source if parser either owns the input source, or feature StreamReadFeature#AUTO_CLOSE_SOURCE is enabled. Whether parser owns the input source depends on factory method that was used to construct instance (so check tools.jackson.core.json.JsonFactory for details, but the general idea is that if caller passes in closable resource (such as InputStream or Reader) parser does NOT own the source; but if it passes a reference (such as java.io.File or java.net.URL and creates stream or reader it does own them.

Annotations
@Override
convertNumberToBigDecimalback to summary
protected final void convertNumberToBigDecimal() throws JacksonException
convertNumberToBigIntegerback to summary
protected final void convertNumberToBigInteger() throws JacksonException
convertNumberToDoubleback to summary
protected final void convertNumberToDouble() throws JacksonException
convertNumberToFloatback to summary
protected final void convertNumberToFloat() throws JacksonException
convertNumberToIntback to summary
protected final void convertNumberToInt() throws JacksonException
convertNumberToLongback to summary
protected final void convertNumberToLong() throws JacksonException
currentLocationback to summary
public final TokenStreamLocation currentLocation()

Implements abstract tools.jackson.core.JsonParser.currentLocation.

Overridden since we do not really have character-based locations, but we do have byte offset to specify.

Annotations
@Override
currentNameback to summary
public final String currentName()

Implements abstract tools.jackson.core.JsonParser.currentName.

Method that can be called to get the name associated with the current event.

Annotations
@Override
currentTokenLocationback to summary
public final TokenStreamLocation currentTokenLocation()

Implements abstract tools.jackson.core.JsonParser.currentTokenLocation.

Overridden since we do not really have character-based locations, but we do have byte offset to specify.

Annotations
@Override
currentValueback to summary
public Object currentValue()

Implements abstract tools.jackson.core.JsonParser.currentValue.

Doc from tools.jackson.core.JsonParser.currentValue.

Helper method, usually equivalent to: getParsingContext().currentValue();

Note that "current value" is NOT populated (or used) by Streaming parser; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.

Annotations
@Override
getBigIntegerValueback to summary
public final BigInteger getBigIntegerValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getBigIntegerValue.

Doc from tools.jackson.core.JsonParser.getBigIntegerValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it cannot be used as a Java long primitive type due to its magnitude. It can also be called for JsonToken#VALUE_NUMBER_FLOAT; if so, it is equivalent to calling getDecimalValue and then constructing a BigInteger from that value.

Annotations
@Override
getDecimalValueback to summary
public final BigDecimal getDecimalValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getDecimalValue.

Doc from tools.jackson.core.JsonParser.getDecimalValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT or JsonToken#VALUE_NUMBER_INT. No under/overflow exceptions are ever thrown.

Annotations
@Override
getDoubleValueback to summary
public final double getDoubleValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getDoubleValue.

Doc from tools.jackson.core.JsonParser.getDoubleValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java double primitive type. It can also be called for JsonToken#VALUE_NUMBER_INT; if so, it is equivalent to calling getLongValue and then casting; except for possible overflow/underflow exception.

Note

if the value falls outside of range of Java double, a InputCoercionException will be thrown to indicate numeric overflow/underflow.

Annotations
@Override
getFloatValueback to summary
public final float getFloatValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getFloatValue.

Doc from tools.jackson.core.JsonParser.getFloatValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java float primitive type. It can also be called for JsonToken#VALUE_NUMBER_INT; if so, it is equivalent to calling getLongValue and then casting; except for possible overflow/underflow exception.

Note

if the value falls outside of range of Java float, a InputCoercionException will be thrown to indicate numeric overflow/underflow.

Annotations
@Override
getIntValueback to summary
public final int getIntValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getIntValue.

Doc from tools.jackson.core.JsonParser.getIntValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a value of Java int primitive type. It can also be called for JsonToken#VALUE_NUMBER_FLOAT; if so, it is equivalent to calling getDoubleValue and then casting; except for possible overflow/underflow exception.

Note

if the resulting integer value falls outside range of Java int, a InputCoercionException may be thrown to indicate numeric overflow/underflow.

Annotations
@Override
getLongValueback to summary
public final long getLongValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getLongValue.

Doc from tools.jackson.core.JsonParser.getLongValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a Java long primitive type. It can also be called for JsonToken#VALUE_NUMBER_FLOAT; if so, it is equivalent to calling getDoubleValue and then casting to int; except for possible overflow/underflow exception.

Note

if the token is an integer, but its value falls outside of range of Java long, a InputCoercionException may be thrown to indicate numeric overflow/underflow.

Annotations
@Override
getNumberTypeback to summary
public final JsonParser.NumberType getNumberType() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getNumberType.

Doc from tools.jackson.core.JsonParser.getNumberType.

If current token is of type JsonToken#VALUE_NUMBER_INT or JsonToken#VALUE_NUMBER_FLOAT, returns one of NumberType constants; otherwise returns null.

Note

in Jackson 2.x, an exception was wrong if called for non-numeric token.

Annotations
@Override
getNumberTypeFPback to summary
public JsonParser.NumberTypeFP getNumberTypeFP() throws JacksonException

Overrides tools.jackson.core.base.ParserMinimalBase.getNumberTypeFP.

Doc from tools.jackson.core.JsonParser.getNumberTypeFP.

If current token is of type JsonToken#VALUE_NUMBER_FLOAT, returns one of NumberTypeFP constants; otherwise returns NumberTypeFP#UNKNOWN.

Annotations
@Override
getNumberValueback to summary
public final Number getNumberValue() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.getNumberValue.

Doc from tools.jackson.core.JsonParser.getNumberValue.

Generic number value accessor method that will work for all kinds of numeric values. It will return the optimal (simplest/smallest possible) wrapper object that can express the numeric value just parsed.

Annotations
@Override
getNumberValueExactback to summary
public final Number getNumberValueExact() throws JacksonException

Overrides tools.jackson.core.base.ParserMinimalBase.getNumberValueExact.

Doc from tools.jackson.core.JsonParser.getNumberValueExact.

Method similar to getNumberValue with the difference that for floating-point numbers value returned may be BigDecimal if the underlying format does not store floating-point numbers using native representation: for example, textual formats represent numbers as Strings (which are 10-based), and conversion to java.lang.Double is potentially lossy operation.

Default implementation simply returns getNumberValue()

Annotations
@Override
isClosedback to summary
public final boolean isClosed()

Overrides tools.jackson.core.base.ParserMinimalBase.isClosed.

Doc from tools.jackson.core.JsonParser.isClosed.

Method that can be called to determine whether this parser is closed or not. If it is closed, no new tokens can be retrieved by calling nextToken (and the underlying stream may be closed). Closing may be due to an explicit call to close or because parser has encountered end of input.

Annotations
@Override
isNaNback to summary
public final boolean isNaN() throws JacksonException

Implements abstract tools.jackson.core.JsonParser.isNaN.

Doc from tools.jackson.core.JsonParser.isNaN.

Accessor for checking whether current token is a special "not-a-number" (NaN) token (including both "NaN" AND positive/negative infinity!). These values are not supported by all formats: JSON, for example, only supports them if JsonReadFeature#ALLOW_NON_NUMERIC_NUMBERS is enabled.

Note

in case where numeric value is outside range of requested type -- most notably java.lang.Float or java.lang.Double -- and decoding results effectively in a NaN value, this method DOES NOT return true: only explicit incoming markers do. This is because value could still be accessed as a valid BigDecimal.

Annotations
@Override
mayContainRawBinaryback to summary
public final boolean mayContainRawBinary()
streamReadCapabilitiesback to summary
public JacksonFeatureSet<StreamReadCapability> streamReadCapabilities()

Overrides tools.jackson.core.base.ParserMinimalBase.streamReadCapabilities.

Doc from tools.jackson.core.JsonParser.streamReadCapabilities.

Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly).

Annotations
@Override
streamReadContextback to summary
public final SimpleStreamReadContext streamReadContext()

Implements abstract tools.jackson.core.JsonParser.streamReadContext.

Doc from tools.jackson.core.JsonParser.streamReadContext.

Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information. Contexts are hierarchically nested, and can be used for example for figuring out part of the input document that correspond to specific array or object (for highlighting purposes, or error reporting). Contexts can also be used for simple xpath-like matching of input, if so desired.

Note

method was called getParsingContext() in Jackson 2.x

Annotations
@Override
versionback to summary
public final Version version()

Implements abstract tools.jackson.core.JsonParser.version.

Implements tools.jackson.core.Versioned.version.

Doc from tools.jackson.core.JsonParser.version.

Accessor for getting version of the core package, given a parser instance. Left for sub-classes to implement.

Annotations
@Override