public abstract class AvroParser
extends com.fasterxml.jackson.core.base.ParserBase
JsonParser implementation for decoding Avro content and
exposing at as a stream of JsonTokens, 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 InputStream |
_input |
protected com.fasterxml.jackson.core.ObjectCodec |
_objectCodec
Codec used for data binding when (if) requested.
|
protected AvroSchema |
_rootSchema |
protected String |
_textValue
We need to keep track of text values.
|
_binaryValue, _byteArrayBuilder, _closed, _currInputProcessed, _currInputRow, _currInputRowStart, _expLength, _fractLength, _inputEnd, _inputPtr, _intLength, _ioContext, _nameCopied, _nameCopyBuffer, _nextToken, _numberBigDecimal, _numberBigInt, _numberDouble, _numberInt, _numberLong, _numberNegative, _numTypesValid, _parsingContext, _textBuffer, _tokenInputCol, _tokenInputRow, _tokenInputTotal, CHAR_NULL, INT_0, INT_9, INT_MINUS, INT_PLUS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, 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,
byte[] data,
int offset,
int len) |
protected |
AvroParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int parserFeatures,
int avroFeatures,
com.fasterxml.jackson.core.ObjectCodec codec,
InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_closeInput() |
protected void |
_finishString() |
protected abstract void |
_initSchema(AvroSchema schema) |
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() |
Object |
getInputSource() |
AvroSchema |
getSchema() |
String |
getText() |
int |
getText(Writer writer) |
char[] |
getTextCharacters() |
int |
getTextLength() |
int |
getTextOffset() |
com.fasterxml.jackson.core.JsonLocation |
getTokenLocation() |
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, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getByteArrayBuilder, _handleEOF, _parseIntValue, _parseNumericValue, _releaseBuffers, _reportMismatchedEndMarker, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, disable, enable, getBigIntegerValue, getCurrentValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, isClosed, loadMore, loadMoreGuaranteed, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reportInvalidNumber, reportOverflowInt, reportOverflowLong, reportUnexpectedNumberChar, reset, resetAsNaN, resetFloat, resetInt, setCurrentValue, setFeatureMask_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _handleUnrecognizedCharacterEscape, _hasTextualNull, _reportError, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _throwUnquotedSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, skipChildren_codec, _constructError, _reportUnsupportedOperation, canReadObjectId, canReadTypeId, configure, finishToken, getBinaryValue, getBooleanValue, getByteValue, getFeatureMask, getFormatFeatures, getObjectId, getShortValue, getTypeId, getValueAsBoolean, getValueAsDouble, isEnabled, nextBooleanValue, nextFieldName, nextFieldName, nextIntValue, nextLongValue, nextTextValue, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, requiresCustomCodec, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnErrorprotected com.fasterxml.jackson.core.ObjectCodec _objectCodec
protected AvroSchema _rootSchema
protected int _formatFeatures
protected final InputStream _input
protected AvroReadContext _avroContext
protected String _textValue
protected AvroParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int parserFeatures,
int avroFeatures,
com.fasterxml.jackson.core.ObjectCodec codec,
InputStream in)
protected AvroParser(com.fasterxml.jackson.core.io.IOContext ctxt,
int parserFeatures,
int avroFeatures,
com.fasterxml.jackson.core.ObjectCodec codec,
byte[] data,
int offset,
int len)
public com.fasterxml.jackson.core.ObjectCodec getCodec()
getCodec in class com.fasterxml.jackson.core.JsonParserpublic void setCodec(com.fasterxml.jackson.core.ObjectCodec c)
setCodec in class com.fasterxml.jackson.core.JsonParserpublic Object getInputSource()
getInputSource in class com.fasterxml.jackson.core.JsonParserpublic abstract com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values,
int mask)
overrideFormatFeatures in class com.fasterxml.jackson.core.JsonParserpublic com.fasterxml.jackson.core.Version version()
version in interface com.fasterxml.jackson.core.Versionedversion in class com.fasterxml.jackson.core.base.ParserBaseprotected void _finishString()
throws IOException
_finishString in class com.fasterxml.jackson.core.base.ParserBaseIOExceptionprotected void _closeInput()
throws IOException
_closeInput in class com.fasterxml.jackson.core.base.ParserBaseIOExceptionpublic 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.JsonParserpublic AvroSchema getSchema()
getSchema in class com.fasterxml.jackson.core.JsonParserpublic void setSchema(com.fasterxml.jackson.core.FormatSchema schema)
setSchema in class com.fasterxml.jackson.core.JsonParserprotected abstract void _initSchema(AvroSchema schema)
public com.fasterxml.jackson.core.JsonLocation getTokenLocation()
getTokenLocation in class com.fasterxml.jackson.core.base.ParserBasepublic com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
getCurrentLocation in class com.fasterxml.jackson.core.base.ParserBasepublic abstract com.fasterxml.jackson.core.JsonToken nextToken()
throws IOException
nextToken in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic boolean hasTextCharacters()
hasTextCharacters in class com.fasterxml.jackson.core.base.ParserBasepublic String getText() throws IOException
getText in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic int getText(Writer writer) throws IOException
getText in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic String getCurrentName() throws IOException
getCurrentName in class com.fasterxml.jackson.core.base.ParserBaseIOExceptionpublic void overrideCurrentName(String name)
overrideCurrentName in class com.fasterxml.jackson.core.base.ParserBasepublic char[] getTextCharacters()
throws IOException
getTextCharacters in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic int getTextLength()
throws IOException
getTextLength in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic int getTextOffset()
throws IOException
getTextOffset in class com.fasterxml.jackson.core.base.ParserMinimalBaseIOExceptionpublic Object getEmbeddedObject() throws IOException
getEmbeddedObject in class com.fasterxml.jackson.core.JsonParserIOExceptionpublic byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant variant)
throws IOException
getBinaryValue in class com.fasterxml.jackson.core.base.ParserBaseIOExceptionCopyright © 2016 FasterXML. All rights reserved.