Class AvroParserImpl
java.lang.Object
tools.jackson.core.JsonParser
tools.jackson.core.base.ParserMinimalBase
tools.jackson.core.base.ParserBase
tools.jackson.dataformat.avro.AvroParser
tools.jackson.dataformat.avro.deser.AvroParserImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,tools.jackson.core.Versioned
- Direct Known Subclasses:
ApacheAvroParserImpl,JacksonAvroParserImpl
Implementation base class that exposes additional internal API
to be used as callbacks by
AvroReadContext implementations.-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.core.JsonParser
tools.jackson.core.JsonParser.NumberType, tools.jackson.core.JsonParser.NumberTypeFP -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intIndex of the union branch that was followed to reach the current token.protected intIndex of the enum that was read as the current token.Fields inherited from class tools.jackson.dataformat.avro.AvroParser
_avroContext, _formatFeatures, _rootSchema, _streamReadContext, AVRO_READ_CAPABILITIESFields inherited from class tools.jackson.core.base.ParserBase
_binaryValue, _byteArrayBuilder, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _numberBigDecimal, _numberBigInt, _numberDouble, _numberFloat, _numberInt, _numberIsNaN, _numberLong, _numberNegative, _numberString, _numTypesValid, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotalFields inherited from class tools.jackson.core.base.ParserMinimalBase
_closed, _currToken, _ioContext, _lastClearedToken, _objectReadContext, _streamReadConstraints, _streamReadFeatures, _tokenCount, _trackMaxTokenCount, BD_MAX_INT, BD_MAX_LONG, BD_MIN_INT, BD_MIN_LONG, BI_MAX_INT, BI_MAX_LONG, BI_MIN_INT, BI_MIN_LONG, CHAR_NULL, INT_0, INT_9, INT_APOS, INT_ASTERISK, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_MINUS, INT_PERIOD, INT_PLUS, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_RS, INT_SLASH, INT_SPACE, INT_TAB, MAX_BYTE_I, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MAX_SHORT_I, MIN_BYTE_I, MIN_INT_D, MIN_INT_L, MIN_LONG_D, MIN_SHORT_I, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN, STREAM_READ_FEATURE_DEFAULTSFields inherited from class tools.jackson.core.JsonParser
DEFAULT_READ_CAPABILITIES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAvroParserImpl(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int avroFeatures, AvroSchema schema) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidfinal void_initSchema(AvroSchema schema) final intabstract booleanvoidclose()protected final voidprotected final voidprotected final voidprotected final voidprotected final voidprotected final voidabstract longabstract longabstract tools.jackson.core.JsonTokenabstract tools.jackson.core.JsonTokentools.jackson.core.JsonTokendecodeBytesDecimal(int scale) abstract tools.jackson.core.JsonTokenabstract intabstract tools.jackson.core.JsonTokendecodeFixed(int size) tools.jackson.core.JsonTokendecodeFixedDecimal(int scale, int size) abstract tools.jackson.core.JsonTokenabstract intabstract intabstract tools.jackson.core.JsonTokenabstract longabstract tools.jackson.core.JsonTokenabstract Stringabstract longabstract longabstract voidabstract tools.jackson.core.JsonTokenfinal intfinal floatfinal tools.jackson.core.JsonParser.NumberTypetools.jackson.core.JsonParser.NumberTypeFPfinal Numberfinal NumberlongReturns the remaining number of elements in the current block of a map or arrayfinal booleanisNaN()final booleanisRecord()nextName()booleannextName(tools.jackson.core.SerializableString sstr) intnextNameMatch(tools.jackson.core.sym.PropertyNameMatcher matcher) abstract Stringtools.jackson.core.JsonTokenfinal voidprotected final tools.jackson.core.JsonTokensetBytes(byte[] b) protected final tools.jackson.core.JsonTokensetNumber(double v) protected final tools.jackson.core.JsonTokensetNumber(float v) protected final tools.jackson.core.JsonTokensetNumber(int v) protected final tools.jackson.core.JsonTokensetNumber(long v) protected abstract tools.jackson.core.JsonTokenabstract longabstract voidabstract voidvoidabstract voidabstract voidskipFixed(int size) voidskipFixedDecimal(int size) abstract voidabstract voidskipInt()abstract voidskipLong()abstract longskipMap()abstract voidfinal voidSkip to the end of the current structure (array/map/object); This is different fromskipMap()andskipArray()because it operates at the parser level instead of at the decoder level and advances the parsing context in addition to consuming the data from the input.Methods inherited from class tools.jackson.dataformat.avro.AvroParser
_closeInput, _parseIntValue, _parseNumericValue, assignCurrentValue, canReadTypeId, configure, currentLocation, currentName, currentTokenLocation, currentValue, disable, enable, getBinaryValue, getEmbeddedObject, getSchema, getString, getString, getStringCharacters, getStringLength, getStringOffset, getTypeId, hasStringCharacters, isEnabled, setSchema, streamReadCapabilities, streamReadContext, streamReadInputSource, versionMethods inherited from class tools.jackson.core.base.ParserBase
_contentReference, _contentReferenceRedacted, _convertBigDecimalToBigInteger, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getNumberDouble, _getNumberFloat, _growNameDecodeBuffer, _handleBase64MissingPadding, _handleEOF, _releaseBuffers, _reportInvalidBase64Char, _reportInvalidBase64Char, getBigIntegerValue, getDecimalValue, getDoubleValue, getIntValue, getLongValue, getNumberValueDeferred, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, reset, resetAsNaN, resetFloat, resetIntMethods inherited from class 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, _reportInvalidUTF8Surrogate, _reportMissingRootWS, _reportOverflowByte, _reportOverflowInt, _reportOverflowInt, _reportOverflowInt, _reportOverflowLong, _reportOverflowLong, _reportOverflowLong, _reportOverflowShort, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _updateToken, _updateTokenToNA, _updateTokenToNull, _wrapIOFailure, clearCurrentToken, currentNameMatch, currentToken, currentTokenCount, currentTokenId, finishToken, getBooleanValue, getByteValue, getLastClearedToken, getShortValue, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isClosed, isEnabled, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, objectReadContext, readValueAs, readValueAs, readValueAs, readValueAsTree, skipChildren, streamReadConstraints, streamReadFeaturesMethods inherited from class tools.jackson.core.JsonParser
_constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, canParseAsync, canReadObjectId, getBinaryValue, getObjectId, getText, getTextCharacters, getTextLength, getTextOffset, getValueAsBoolean, getValueAsDouble, nextBooleanValue, nextIntValue, nextLongValue, nonBlockingInputFeeder, readBinaryValue, readBinaryValue, readString, releaseBuffered, releaseBuffered
-
Field Details
-
_branchIndex
protected int _branchIndexIndex of the union branch that was followed to reach the current token. This is cleared when the next token is read. -
_enumIndex
protected int _enumIndexIndex of the enum that was read as the current token. This is cleared when the next token is read.
-
-
Constructor Details
-
AvroParserImpl
protected AvroParserImpl(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int avroFeatures, AvroSchema schema)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classtools.jackson.core.base.ParserBase
-
nextToken
public tools.jackson.core.JsonToken nextToken() throws tools.jackson.core.JacksonException- Specified by:
nextTokenin classtools.jackson.core.JsonParser- Throws:
tools.jackson.core.JacksonException
-
skipValue
public final void skipValue() throws tools.jackson.core.JacksonExceptionSkip to the end of the current structure (array/map/object); This is different fromskipMap()andskipArray()because it operates at the parser level instead of at the decoder level and advances the parsing context in addition to consuming the data from the input.- Throws:
tools.jackson.core.JacksonException- If there was an issue advancing through the underlying data stream
-
nextName
- Overrides:
nextNamein classtools.jackson.core.base.ParserMinimalBase- Throws:
tools.jackson.core.JacksonException
-
nextName
public boolean nextName(tools.jackson.core.SerializableString sstr) throws tools.jackson.core.JacksonException - Overrides:
nextNamein classtools.jackson.core.base.ParserMinimalBase- Throws:
tools.jackson.core.JacksonException
-
nextNameMatch
public int nextNameMatch(tools.jackson.core.sym.PropertyNameMatcher matcher) throws tools.jackson.core.JacksonException - Overrides:
nextNameMatchin classtools.jackson.core.base.ParserMinimalBase- Throws:
tools.jackson.core.JacksonException
-
nextStringValue
- Overrides:
nextStringValuein classtools.jackson.core.JsonParser- Throws:
tools.jackson.core.JacksonException
-
_initSchema
- Specified by:
_initSchemain classAvroParser- Throws:
tools.jackson.core.JacksonException
-
isNaN
public final boolean isNaN()- Overrides:
isNaNin classtools.jackson.core.base.ParserBase
-
getNumberValue
- Overrides:
getNumberValuein classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
getNumberValueExact
- Overrides:
getNumberValueExactin classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
getNumberType
public final tools.jackson.core.JsonParser.NumberType getNumberType() throws tools.jackson.core.JacksonException- Overrides:
getNumberTypein classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
getNumberTypeFP
public tools.jackson.core.JsonParser.NumberTypeFP getNumberTypeFP() throws tools.jackson.core.JacksonException- Overrides:
getNumberTypeFPin classtools.jackson.core.base.ParserMinimalBase- Throws:
tools.jackson.core.JacksonException
-
getFloatValue
public final float getFloatValue() throws tools.jackson.core.JacksonException- Overrides:
getFloatValuein classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
_checkNumericValue
protected final void _checkNumericValue() throws tools.jackson.core.JacksonException- Throws:
tools.jackson.core.JacksonException
-
convertNumberToInt
protected final void convertNumberToInt() throws tools.jackson.core.JacksonException- Overrides:
convertNumberToIntin classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
convertNumberToLong
protected final void convertNumberToLong() throws tools.jackson.core.JacksonException- Overrides:
convertNumberToLongin classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
convertNumberToBigInteger
protected final void convertNumberToBigInteger() throws tools.jackson.core.JacksonException- Overrides:
convertNumberToBigIntegerin classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
convertNumberToFloat
protected final void convertNumberToFloat() throws tools.jackson.core.JacksonException- Overrides:
convertNumberToFloatin classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
convertNumberToDouble
protected final void convertNumberToDouble() throws tools.jackson.core.JacksonException- Overrides:
convertNumberToDoublein classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
convertNumberToBigDecimal
protected final void convertNumberToBigDecimal() throws tools.jackson.core.JacksonException- Overrides:
convertNumberToBigDecimalin classtools.jackson.core.base.ParserBase- Throws:
tools.jackson.core.JacksonException
-
checkInputEnd
- Throws:
IOException
-
getRemainingElements
public long getRemainingElements()Returns the remaining number of elements in the current block of a map or array -
decodeIntToken
- Throws:
IOException
-
decodeInt
- Throws:
IOException
-
skipInt
- Throws:
IOException
-
decodeLongToken
- Throws:
IOException
-
decodeLong
- Throws:
IOException
-
skipLong
- Throws:
IOException
-
decodeFloat
- Throws:
IOException
-
skipFloat
- Throws:
IOException
-
decodeDouble
- Throws:
IOException
-
skipDouble
- Throws:
IOException
-
decodeStringToken
- Throws:
IOException
-
decodeString
- Throws:
IOException
-
skipString
- Throws:
IOException
-
decodeBytes
- Throws:
IOException
-
skipBytes
- Throws:
IOException
-
decodeFixed
- Throws:
IOException
-
skipFixed
- Throws:
IOException
-
decodeArrayStart
- Throws:
IOException
-
decodeArrayNext
- Throws:
IOException
-
skipArray
- Returns:
- Either 0, in which case all entries have been successfully skipped; or positive non-zero number to indicate elements that caller has to skip
- Throws:
IOException
-
decodeMapKey
- Throws:
IOException
-
decodeMapStart
- Throws:
IOException
-
decodeMapNext
- Throws:
IOException
-
skipMap
- Returns:
- Either 0, in which case all entries have been successfully skipped; or positive non-zero number to indicate map entries that caller has to skip
- Throws:
IOException
-
decodeBoolean
- Throws:
IOException
-
skipBoolean
- Throws:
IOException
-
decodeIndex
- Throws:
IOException
-
decodeEnum
- Throws:
IOException
-
decodeBytesDecimal
- Throws:
IOException
-
skipBytesDecimal
- Throws:
IOException
-
decodeFixedDecimal
- Throws:
IOException
-
skipFixedDecimal
- Throws:
IOException
-
branchIndex
public final int branchIndex() -
enumIndex
public final int enumIndex() -
isRecord
public final boolean isRecord() -
setAvroContext
-
setBytes
protected final tools.jackson.core.JsonToken setBytes(byte[] b) -
setNumber
protected final tools.jackson.core.JsonToken setNumber(int v) -
setNumber
protected final tools.jackson.core.JsonToken setNumber(long v) -
setNumber
protected final tools.jackson.core.JsonToken setNumber(float v) -
setNumber
protected final tools.jackson.core.JsonToken setNumber(double v) -
setString
- Throws:
IOException
-