public abstract class AvroParser
extends com.fasterxml.jackson.core.base.ParserBase
JsonParser
implementation for decoding Avro content and
exposing at as a stream of JsonToken
s, to be used
for data binding.Modifier and Type | Class and Description |
---|---|
static class |
AvroParser.Feature
Enumeration that defines all togglable features for Avro parsers.
|
Modifier and Type | Field and Description |
---|---|
protected AvroReadContext |
_avroContext |
protected int |
_formatFeatures |
protected com.fasterxml.jackson.core.ObjectCodec |
_objectCodec
Codec used for data binding when (if) requested.
|
protected AvroSchema |
_rootSchema |
protected static com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> |
AVRO_READ_CAPABILITIES |
_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberFloat, _numberInt, _numberLong, _numberNegative, _numberString, _numTypesValid, _parsingContext, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, JSON_READ_CAPABILITIES
_currToken, _lastClearedToken, 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_SLASH, INT_SPACE, INT_TAB, MAX_ERROR_TOKEN_LENGTH, MAX_INT_D, MAX_INT_L, MAX_LONG_D, MIN_INT_D, MIN_INT_L, MIN_LONG_D, NO_BYTES, NO_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
AvroParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int parserFeatures,
int avroFeatures,
com.fasterxml.jackson.core.ObjectCodec codec) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
_closeInput() |
protected void |
_finishString() |
protected abstract void |
_initSchema(AvroSchema schema) |
boolean |
canReadTypeId() |
boolean |
canUseSchema(com.fasterxml.jackson.core.FormatSchema schema) |
com.fasterxml.jackson.core.JsonParser |
configure(AvroParser.Feature f,
boolean state)
Method for enabling or disabling specified Avro feature
(check
AvroParser.Feature for list of features) |
com.fasterxml.jackson.core.JsonParser |
disable(AvroParser.Feature f)
Method for disabling specified Avro feature
(check
AvroParser.Feature for list of features) |
com.fasterxml.jackson.core.JsonParser |
enable(AvroParser.Feature f)
Method for enabling specified Avro feature
(check
AvroParser.Feature for list of features) |
byte[] |
getBinaryValue(com.fasterxml.jackson.core.Base64Variant variant) |
com.fasterxml.jackson.core.ObjectCodec |
getCodec() |
com.fasterxml.jackson.core.JsonLocation |
getCurrentLocation() |
String |
getCurrentName() |
Object |
getEmbeddedObject() |
abstract Object |
getInputSource() |
com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> |
getReadCapabilities() |
AvroSchema |
getSchema() |
abstract String |
getText() |
abstract int |
getText(Writer writer) |
char[] |
getTextCharacters() |
int |
getTextLength() |
int |
getTextOffset() |
com.fasterxml.jackson.core.JsonLocation |
getTokenLocation() |
Object |
getTypeId() |
abstract boolean |
hasTextCharacters() |
boolean |
isEnabled(AvroParser.Feature f)
Method for checking whether specified Avro
AvroParser.Feature
is enabled. |
abstract com.fasterxml.jackson.core.JsonToken |
nextToken() |
void |
overrideCurrentName(String name) |
abstract com.fasterxml.jackson.core.JsonParser |
overrideFormatFeatures(int values,
int mask) |
void |
setCodec(com.fasterxml.jackson.core.ObjectCodec c) |
void |
setSchema(com.fasterxml.jackson.core.FormatSchema schema) |
com.fasterxml.jackson.core.Version |
version() |
_checkStdFeatureChanges, _contentReference, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getBigDecimal, _getBigInteger, _getByteArrayBuilder, _getSourceReference, _handleBase64MissingPadding, _handleEOF, _handleUnrecognizedCharacterEscape, _parseIntValue, _parseNumericValue, _releaseBuffers, _reportMismatchedEndMarker, _reportTooLongIntegral, _throwUnquotedSpace, _validJsonTokenList, _validJsonValueList, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToFloat, convertNumberToInt, convertNumberToLong, disable, enable, getBigIntegerValue, getCurrentValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getNumberValueExact, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, isClosed, isNaN, loadMore, loadMoreGuaranteed, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reset, resetAsNaN, resetFloat, resetInt, setCurrentValue, setFeatureMask
_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _reportUnexpectedNumberChar, _throwInternal, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isExpectedNumberIntToken, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren
_codec, _constructError, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _constructReadException, _reportUnsupportedOperation, assignCurrentValue, canParseAsync, canReadObjectId, configure, currentLocation, currentName, currentTokenLocation, currentValue, finishToken, getBinaryValue, getBooleanValue, getByteValue, getFeatureMask, getFormatFeatures, getNonBlockingInputFeeder, getObjectId, getShortValue, getValueAsBoolean, getValueAsDouble, isEnabled, isEnabled, nextBooleanValue, nextFieldName, nextFieldName, nextIntValue, nextLongValue, nextTextValue, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, requiresCustomCodec, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError
protected static final com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> AVRO_READ_CAPABILITIES
protected com.fasterxml.jackson.core.ObjectCodec _objectCodec
protected AvroSchema _rootSchema
protected int _formatFeatures
protected AvroReadContext _avroContext
protected AvroParser(com.fasterxml.jackson.core.io.IOContext ctxt, int parserFeatures, int avroFeatures, com.fasterxml.jackson.core.ObjectCodec codec)
public com.fasterxml.jackson.core.ObjectCodec getCodec()
getCodec
in class com.fasterxml.jackson.core.JsonParser
public void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
setCodec
in class com.fasterxml.jackson.core.JsonParser
public abstract Object getInputSource()
getInputSource
in class com.fasterxml.jackson.core.JsonParser
public abstract com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values, int mask)
overrideFormatFeatures
in class com.fasterxml.jackson.core.JsonParser
public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> getReadCapabilities()
getReadCapabilities
in class com.fasterxml.jackson.core.JsonParser
public com.fasterxml.jackson.core.Version version()
version
in interface com.fasterxml.jackson.core.Versioned
version
in class com.fasterxml.jackson.core.base.ParserBase
protected void _finishString() throws IOException
_finishString
in class com.fasterxml.jackson.core.base.ParserBase
IOException
protected abstract void _closeInput() throws IOException
_closeInput
in class com.fasterxml.jackson.core.base.ParserBase
IOException
public com.fasterxml.jackson.core.JsonParser enable(AvroParser.Feature f)
AvroParser.Feature
for list of features)public com.fasterxml.jackson.core.JsonParser disable(AvroParser.Feature f)
AvroParser.Feature
for list of features)public com.fasterxml.jackson.core.JsonParser configure(AvroParser.Feature f, boolean state)
AvroParser.Feature
for list of features)public boolean isEnabled(AvroParser.Feature f)
AvroParser.Feature
is enabled.public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
canUseSchema
in class com.fasterxml.jackson.core.JsonParser
public AvroSchema getSchema()
getSchema
in class com.fasterxml.jackson.core.JsonParser
public void setSchema(com.fasterxml.jackson.core.FormatSchema schema)
setSchema
in class com.fasterxml.jackson.core.JsonParser
protected abstract void _initSchema(AvroSchema schema) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException
public boolean canReadTypeId()
canReadTypeId
in class com.fasterxml.jackson.core.JsonParser
public Object getTypeId() throws IOException
getTypeId
in class com.fasterxml.jackson.core.JsonParser
IOException
public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
getTokenLocation
in class com.fasterxml.jackson.core.base.ParserBase
public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
getCurrentLocation
in class com.fasterxml.jackson.core.base.ParserBase
public abstract com.fasterxml.jackson.core.JsonToken nextToken() throws IOException
nextToken
in class com.fasterxml.jackson.core.base.ParserMinimalBase
IOException
public abstract boolean hasTextCharacters()
hasTextCharacters
in class com.fasterxml.jackson.core.base.ParserBase
public abstract String getText() throws IOException
getText
in class com.fasterxml.jackson.core.base.ParserMinimalBase
IOException
public abstract int getText(Writer writer) throws IOException
getText
in class com.fasterxml.jackson.core.JsonParser
IOException
public String getCurrentName() throws IOException
getCurrentName
in class com.fasterxml.jackson.core.base.ParserBase
IOException
public void overrideCurrentName(String name)
overrideCurrentName
in class com.fasterxml.jackson.core.base.ParserBase
public char[] getTextCharacters() throws IOException
getTextCharacters
in class com.fasterxml.jackson.core.base.ParserMinimalBase
IOException
public int getTextLength() throws IOException
getTextLength
in class com.fasterxml.jackson.core.base.ParserMinimalBase
IOException
public int getTextOffset() throws IOException
getTextOffset
in class com.fasterxml.jackson.core.base.ParserMinimalBase
IOException
public Object getEmbeddedObject() throws IOException
getEmbeddedObject
in class com.fasterxml.jackson.core.JsonParser
IOException
public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant variant) throws IOException
getBinaryValue
in class com.fasterxml.jackson.core.base.ParserBase
IOException
Copyright © 2022 FasterXML. All rights reserved.