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

public abstract Class SmileParserBase

extends ParserMinimalBase
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.dataformat.smile.async.NonBlockingParserBase, com.fasterxml.jackson.dataformat.smile.SmileParser
Imports
java.io.IOException, java.math.BigDecimal, .BigInteger, com.fasterxml.jackson.core.*, com.fasterxml.jackson.core.base.ParserMinimalBase, com.fasterxml.jackson.core.io.IOContext, .ContentReference, .NumberInput, com.fasterxml.jackson.core.json.DupDetector, .JsonReadContext, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer, com.fasterxml.jackson.core.util.JacksonFeatureSet, .TextBuffer

Since
2.9

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 boolean
_closed

Flag that indicates whether parser is closed or not.

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 SmileParser.Features 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 final IOContext
_ioContext

I/O context for this reader.

protected boolean
_mayContainRawBinary

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

protected boolean
_nameCopied

Flag set to indicate whether the field name is available from the name copy buffer or not (in addition to its String representation being available via read context)

protected char[]
_nameCopyBuffer

Temporary buffer that is needed if field name is accessed using getTextCharacters method (instead of String returning alternatives)

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 JsonReadContext
_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 com.fasterxml.jackson.core.base.ParserMinimalBase:
_currToken_lastClearedTokenBD_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_SLASHINT_SPACEINT_TABMAX_ERROR_TOKEN_LENGTHMAX_INT_DMAX_INT_LMAX_LONG_DMIN_INT_DMIN_INT_LMIN_LONG_DNO_BYTESNO_INTSNR_BIGDECIMALNR_BIGINTNR_DOUBLENR_FLOATNR_INTNR_LONGNR_UNKNOWN

Constructor Summary

AccessConstructor and Description
protected
SmileParserBase(IOContext ctxt, int parserFeatures, int formatFeatures, ByteQuadsCanonicalizer sym)

Method Summary

Modifier and TypeMethod and Description
protected abstract void
protected void
_handleEOF()

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

Method called when an EOF is encountered between tokens.
protected abstract void
protected final void
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 JsonLocation instances.

public final void
close()

Implements abstract com.fasterxml.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 Feature#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 BigInteger
getBigIntegerValue()

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

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can not be used as a Java long primitive type due to its magnitude.
public final JsonLocation
getCurrentLocation()

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

Overridden since we do not really have character-based locations, but we do have byte offset to specify.
public final String
getCurrentName()

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

Method that can be called to get the name associated with the current event.
public final BigDecimal
getDecimalValue()

Implements abstract com.fasterxml.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 com.fasterxml.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 com.fasterxml.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
getFormatFeatures()

Overrides com.fasterxml.jackson.core.JsonParser.getFormatFeatures.

Bulk access method for getting state of all FormatFeatures, format-specific on/off configuration settings.
public final int
getIntValue()

Implements abstract com.fasterxml.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 com.fasterxml.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 com.fasterxml.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 final Number
getNumberValue()

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

Generic number value accessor method that will work for all kinds of numeric values.
public final Number
getNumberValueExact()

Overrides com.fasterxml.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.
public final JsonReadContext
getParsingContext()

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

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 JacksonFeatureSet<StreamReadCapability>
getReadCapabilities()

Overrides com.fasterxml.jackson.core.JsonParser.getReadCapabilities.

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

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

Overridden since we do not really have character-based locations, but we do have byte offset to specify.
public final boolean
isClosed()

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

Method that can be called to determine whether this parser is closed or not.
public final boolean
isNaN()

Overrides com.fasterxml.jackson.core.JsonParser.isNaN.

Access for checking whether current token is a numeric value token, but one that is of "not-a-number" (NaN) variety (including both "NaN" AND positive/negative infinity!): not supported by all formats, but often supported for JsonToken#VALUE_NUMBER_FLOAT.
public final boolean
public final void
overrideCurrentName(String
Name to use as the current name; may be null.
name
)

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

Method that can be used to change what is considered to be the current (field) name.
public final JsonParser
overrideFormatFeatures(int
Bit mask of set/clear state for features to change
values
,
int
Bit mask of features to change
mask
)

Overrides com.fasterxml.jackson.core.JsonParser.overrideFormatFeatures.

Bulk set method for (re)setting states of FormatFeatures, by specifying values (set / clear) along with a mask, to determine which features to change, if any.
public StreamReadConstraints
streamReadConstraints()

Overrides com.fasterxml.jackson.core.JsonParser.streamReadConstraints.

Get the constraints to apply when performing streaming reads.
public final Version
version()

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

Implements com.fasterxml.jackson.core.Versioned.version.

Accessor for getting version of the core package, given a parser instance.
Inherited from com.fasterxml.jackson.core.base.ParserMinimalBase:
_ascii_asciiBytes_constructError_decodeBase64_getCharDesc_hasTextualNull_longIntegerDesc_longNumberDesc_reportError_reportError_reportError_reportInputCoercion_reportInvalidEOF_reportInvalidEOF_reportInvalidEOF_reportInvalidEOFInValue_reportInvalidEOFInValue_reportMissingRootWS_reportUnexpectedChar_reportUnexpectedNumberChar_throwInternal_throwInvalidSpace_wrapErrorclearCurrentTokencurrentTokencurrentTokenIdgetBinaryValuegetCurrentTokengetCurrentTokenIdgetLastClearedTokengetTextgetTextCharactersgetTextLengthgetTextOffsetgetValueAsBooleangetValueAsDoublegetValueAsIntgetValueAsIntgetValueAsLonggetValueAsLonggetValueAsStringgetValueAsStringhasCurrentTokenhasTextCharactershasTokenhasTokenIdisExpectedNumberIntTokenisExpectedStartArrayTokenisExpectedStartObjectTokennextTokennextValuereportInvalidNumberreportOverflowIntreportOverflowIntreportOverflowIntreportOverflowLongreportOverflowLongreportOverflowLongreportUnexpectedNumberCharskipChildren