Class ApacheAvroParserImpl
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
tools.jackson.dataformat.avro.apacheimpl.ApacheAvroParserImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,tools.jackson.core.Versioned
Parser implementation that uses decoder from Apache Avro lib,
instead of Jackson native Avro decoder.
-
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 ApacheCodecRecyclerprotected booleanFlag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not.protected org.apache.avro.io.BinaryDecoderActual decoder in use, possible same as_rootDecoder, but not necessarily, in case of different reader/writer schema in use.protected byte[]Current buffer from which data is read; generally data is read into buffer from input source, but in some cases pre-loaded buffer is handed to the parser.protected InputStreamprotected StringWe need to keep track of text values.protected static final org.apache.avro.io.DecoderFactoryFields inherited from class tools.jackson.dataformat.avro.deser.AvroParserImpl
_branchIndex, _enumIndexFields 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
ConstructorsConstructorDescriptionApacheAvroParserImpl(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int avroFeatures, ApacheCodecRecycler apacheCodecRecycler, AvroSchema schema, byte[] buffer, int offset, int len) ApacheAvroParserImpl(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int avroFeatures, ApacheCodecRecycler apacheCodecRecycler, AvroSchema schema, InputStream in) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidbooleanlonglongtools.jackson.core.JsonTokentools.jackson.core.JsonTokentools.jackson.core.JsonTokeninttools.jackson.core.JsonTokendecodeFixed(int size) tools.jackson.core.JsonTokenintinttools.jackson.core.JsonTokenlongtools.jackson.core.JsonTokenlonglongvoidtools.jackson.core.JsonTokenintbooleanprotected tools.jackson.core.JsonTokenlongvoidvoidvoidvoidskipFixed(int size) voidvoidskipInt()voidskipLong()longskipMap()voidMethods inherited from class tools.jackson.dataformat.avro.deser.AvroParserImpl
_checkNumericValue, _initSchema, branchIndex, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToFloat, convertNumberToInt, convertNumberToLong, decodeBytesDecimal, decodeFixedDecimal, enumIndex, getFloatValue, getNumberType, getNumberTypeFP, getNumberValue, getNumberValueExact, getRemainingElements, isNaN, isRecord, nextName, nextName, nextNameMatch, nextToken, setAvroContext, setBytes, setNumber, setNumber, setNumber, setNumber, skipBytesDecimal, skipFixedDecimal, skipValueMethods inherited from class tools.jackson.dataformat.avro.AvroParser
_parseIntValue, _parseNumericValue, assignCurrentValue, canReadTypeId, configure, currentLocation, currentName, currentTokenLocation, currentValue, disable, enable, getBinaryValue, getEmbeddedObject, getSchema, getStringCharacters, getStringLength, getStringOffset, getTypeId, isEnabled, setSchema, streamReadCapabilities, streamReadContext, versionMethods inherited from class tools.jackson.core.base.ParserBase
_contentReference, _contentReferenceRedacted, _convertBigDecimalToBigInteger, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getNumberDouble, _getNumberFloat, _growNameDecodeBuffer, _handleBase64MissingPadding, _handleEOF, _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
-
DECODER_FACTORY
protected static final org.apache.avro.io.DecoderFactory DECODER_FACTORY- Since:
- 2.16
-
_apacheCodecRecycler
- Since:
- 2.16
-
_inputStream
-
_inputBuffer
protected byte[] _inputBufferCurrent buffer from which data is read; generally data is read into buffer from input source, but in some cases pre-loaded buffer is handed to the parser. -
_bufferRecyclable
protected boolean _bufferRecyclableFlag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not.If it is not, it also means that parser can NOT modify underlying buffer.
-
_decoder
protected org.apache.avro.io.BinaryDecoder _decoderActual decoder in use, possible same as_rootDecoder, but not necessarily, in case of different reader/writer schema in use. -
_textValue
We need to keep track of text values.
-
-
Constructor Details
-
ApacheAvroParserImpl
public ApacheAvroParserImpl(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int avroFeatures, ApacheCodecRecycler apacheCodecRecycler, AvroSchema schema, InputStream in) -
ApacheAvroParserImpl
public ApacheAvroParserImpl(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, int parserFeatures, int avroFeatures, ApacheCodecRecycler apacheCodecRecycler, AvroSchema schema, byte[] buffer, int offset, int len)
-
-
Method Details
-
_releaseBuffers
protected void _releaseBuffers()- Overrides:
_releaseBuffersin classtools.jackson.core.base.ParserBase
-
streamReadInputSource
- Specified by:
streamReadInputSourcein classAvroParser
-
_closeInput
- Specified by:
_closeInputin classAvroParser- Throws:
IOException
-
hasStringCharacters
public boolean hasStringCharacters()- Specified by:
hasStringCharactersin classAvroParser
-
nextStringValue
- Specified by:
nextStringValuein classAvroParserImpl- Throws:
tools.jackson.core.JacksonException
-
getString
- Specified by:
getStringin classAvroParser- Throws:
tools.jackson.core.JacksonException
-
getString
- Specified by:
getStringin classAvroParser- Throws:
tools.jackson.core.JacksonException
-
checkInputEnd
- Specified by:
checkInputEndin classAvroParserImpl- Throws:
IOException
-
decodeBoolean
- Specified by:
decodeBooleanin classAvroParserImpl- Throws:
IOException
-
skipBoolean
- Specified by:
skipBooleanin classAvroParserImpl- Throws:
IOException
-
decodeInt
- Specified by:
decodeIntin classAvroParserImpl- Throws:
IOException
-
decodeIntToken
- Specified by:
decodeIntTokenin classAvroParserImpl- Throws:
IOException
-
skipInt
- Specified by:
skipIntin classAvroParserImpl- Throws:
IOException
-
decodeLong
- Specified by:
decodeLongin classAvroParserImpl- Throws:
IOException
-
decodeLongToken
- Specified by:
decodeLongTokenin classAvroParserImpl- Throws:
IOException
-
skipLong
- Specified by:
skipLongin classAvroParserImpl- Throws:
IOException
-
decodeFloat
- Specified by:
decodeFloatin classAvroParserImpl- Throws:
IOException
-
skipFloat
- Specified by:
skipFloatin classAvroParserImpl- Throws:
IOException
-
decodeDouble
- Specified by:
decodeDoublein classAvroParserImpl- Throws:
IOException
-
skipDouble
- Specified by:
skipDoublein classAvroParserImpl- Throws:
IOException
-
decodeString
- Specified by:
decodeStringin classAvroParserImpl- Throws:
IOException
-
decodeStringToken
- Specified by:
decodeStringTokenin classAvroParserImpl- Throws:
IOException
-
skipString
- Specified by:
skipStringin classAvroParserImpl- Throws:
IOException
-
decodeBytes
- Specified by:
decodeBytesin classAvroParserImpl- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin classAvroParserImpl- Throws:
IOException
-
decodeFixed
- Specified by:
decodeFixedin classAvroParserImpl- Throws:
IOException
-
skipFixed
- Specified by:
skipFixedin classAvroParserImpl- Throws:
IOException
-
decodeArrayStart
- Specified by:
decodeArrayStartin classAvroParserImpl- Throws:
IOException
-
decodeArrayNext
- Specified by:
decodeArrayNextin classAvroParserImpl- Throws:
IOException
-
skipArray
- Specified by:
skipArrayin classAvroParserImpl- 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
- Specified by:
decodeMapKeyin classAvroParserImpl- Throws:
IOException
-
decodeMapStart
- Specified by:
decodeMapStartin classAvroParserImpl- Throws:
IOException
-
decodeMapNext
- Specified by:
decodeMapNextin classAvroParserImpl- Throws:
IOException
-
skipMap
- Specified by:
skipMapin classAvroParserImpl- 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
-
decodeIndex
- Specified by:
decodeIndexin classAvroParserImpl- Throws:
IOException
-
decodeEnum
- Specified by:
decodeEnumin classAvroParserImpl- Throws:
IOException
-
setString
- Specified by:
setStringin classAvroParserImpl
-