com.fasterxml.jackson.dataformat.avro.deser

## Class AvroParserImpl

- java.lang.Object
- - com.fasterxml.jackson.core.JsonParser
  - - com.fasterxml.jackson.core.base.ParserMinimalBase
    - - com.fasterxml.jackson.core.base.ParserBase
      - - com.fasterxml.jackson.dataformat.avro.AvroParser
        - - com.fasterxml.jackson.dataformat.avro.deser.AvroParserImpl

- All Implemented Interfaces:
    com.fasterxml.jackson.core.Versioned, Closeable, AutoCloseable
  Direct Known Subclasses:
    ApacheAvroParserImpl, JacksonAvroParserImpl

      public abstract class AvroParserImpl
      extends AvroParser

  Implementation class that exposes additional internal API to be used as callbacks by `AvroReadContext` implementations.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.fasterxml.jackson.dataformat.avro.AvroParser

      `AvroParser.Feature`

    - ### Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonParser

      `com.fasterxml.jackson.core.JsonParser.NumberType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_branchIndex` Index of the union branch that was followed to reach the current token.
    `protected int` | `_enumIndex` Index of the enum that was read as the current token.
    `protected float` | `_numberFloat` Value if decoded directly as `float`.
    `protected static byte[]` | `NO_BYTES`

    - ### Fields inherited from class com.fasterxml.jackson.dataformat.avro.AvroParser

      `_avroContext, _formatFeatures, _objectCodec, _rootSchema`

    - ### Fields inherited from class com.fasterxml.jackson.core.base.ParserBase

      `_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`

    - ### Fields inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase

      `_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_INTS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_FLOAT, NR_INT, NR_LONG, NR_UNKNOWN`

    - ### Fields inherited from class com.fasterxml.jackson.core.JsonParser

      `_features, _requestPayload`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AvroParserImpl(com.fasterxml.jackson.core.io.IOContext ctxt, int parserFeatures, int avroFeatures, com.fasterxml.jackson.core.ObjectCodec codec)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_checkNumericValue(int expType)`
    `void` | `_initSchema(AvroSchema schema)`
    `int` | `branchIndex()`
    `abstract boolean` | `checkInputEnd()`
    `void` | `close()`
    `protected void` | `convertNumberToBigDecimal()`
    `protected void` | `convertNumberToBigInteger()`
    `protected void` | `convertNumberToDouble()`
    `protected void` | `convertNumberToFloat()`
    `protected void` | `convertNumberToInt()`
    `protected void` | `convertNumberToLong()`
    `abstract long` | `decodeArrayNext()`
    `abstract long` | `decodeArrayStart()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeBoolean()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeBytes()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeDouble()`
    `abstract int` | `decodeEnum()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeFixed(int size)`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeFloat()`
    `abstract int` | `decodeIndex()`
    `abstract int` | `decodeInt()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeIntToken()`
    `abstract long` | `decodeLong()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeLongToken()`
    `abstract String` | `decodeMapKey()`
    `abstract long` | `decodeMapNext()`
    `abstract long` | `decodeMapStart()`
    `abstract void` | `decodeString()`
    `abstract com.fasterxml.jackson.core.JsonToken` | `decodeStringToken()`
    `int` | `enumIndex()`
    `float` | `getFloatValue()`
    `com.fasterxml.jackson.core.JsonParser.NumberType` | `getNumberType()`
    `Number` | `getNumberValue()`
    `long` | `getRemainingElements()` Returns the remaining number of elements in the current block of a map or array
    `boolean` | `isNaN()`
    `boolean` | `isRecord()`
    `String` | `nextFieldName()`
    `boolean` | `nextFieldName(com.fasterxml.jackson.core.SerializableString sstr)`
    `abstract String` | `nextTextValue()`
    `com.fasterxml.jackson.core.JsonToken` | `nextToken()`
    `com.fasterxml.jackson.core.JsonParser` | `overrideFormatFeatures(int values, int mask)`
    `void` | `setAvroContext(AvroReadContext ctxt)`
    `protected com.fasterxml.jackson.core.JsonToken` | `setBytes(byte[] b)`
    `protected com.fasterxml.jackson.core.JsonToken` | `setNumber(double v)`
    `protected com.fasterxml.jackson.core.JsonToken` | `setNumber(float v)`
    `protected com.fasterxml.jackson.core.JsonToken` | `setNumber(int v)`
    `protected com.fasterxml.jackson.core.JsonToken` | `setNumber(long v)`
    `protected abstract com.fasterxml.jackson.core.JsonToken` | `setString(String str)`
    `abstract long` | `skipArray()`
    `abstract void` | `skipBoolean()`
    `abstract void` | `skipBytes()`
    `abstract void` | `skipDouble()`
    `abstract void` | `skipFixed(int size)`
    `abstract void` | `skipFloat()`
    `abstract void` | `skipInt()`
    `abstract void` | `skipLong()`
    `abstract long` | `skipMap()`
    `abstract void` | `skipString()`
    `void` | `skipValue()` Skip to the end of the current structure (array/map/object); This is different from `skipMap()` and `skipArray()` 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 com.fasterxml.jackson.dataformat.avro.AvroParser

      `_closeInput, _finishString, canReadTypeId, canUseSchema, configure, disable, enable, getBinaryValue, getCodec, getCurrentLocation, getCurrentName, getEmbeddedObject, getInputSource, getSchema, getText, getText, getTextCharacters, getTextLength, getTextOffset, getTokenLocation, getTypeId, hasTextCharacters, isEnabled, overrideCurrentName, setCodec, setSchema, version`

    - ### Methods inherited from class com.fasterxml.jackson.core.base.ParserBase

      `_checkStdFeatureChanges, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getByteArrayBuilder, _getSourceReference, _handleEOF, _parseIntValue, _parseNumericValue, _releaseBuffers, _reportMismatchedEndMarker, disable, enable, getBigIntegerValue, getCurrentValue, getDecimalValue, getDoubleValue, getIntValue, getLongValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, isClosed, loadMore, loadMoreGuaranteed, overrideStdFeatures, reportInvalidBase64Char, reportInvalidBase64Char, reset, resetAsNaN, resetFloat, resetInt, setCurrentValue, setFeatureMask`

    - ### Methods inherited from class com.fasterxml.jackson.core.base.ParserMinimalBase

      `_ascii, _asciiBytes, _constructError, _decodeBase64, _getCharDesc, _handleUnrecognizedCharacterEscape, _hasTextualNull, _reportError, _reportError, _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, reportInvalidNumber, reportOverflowInt, reportOverflowLong, reportUnexpectedNumberChar, skipChildren`

    - ### Methods inherited from class com.fasterxml.jackson.core.JsonParser

      `_codec, _constructError, _reportUnsupportedOperation, canParseAsync, canReadObjectId, configure, finishToken, getBinaryValue, getBooleanValue, getByteValue, getFeatureMask, getFormatFeatures, getNonBlockingInputFeeder, getObjectId, getShortValue, getValueAsBoolean, getValueAsDouble, isEnabled, nextBooleanValue, nextIntValue, nextLongValue, readBinaryValue, readBinaryValue, readValueAs, readValueAs, readValueAsTree, readValuesAs, readValuesAs, releaseBuffered, releaseBuffered, requiresCustomCodec, setRequestPayloadOnError, setRequestPayloadOnError, setRequestPayloadOnError`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NO_BYTES

          protected static final byte[] NO_BYTES

    - #### _branchIndex

          protected int _branchIndex

      Index of the union branch that was followed to reach the current token. This is cleared when the next token is read.
      Since:
        2.9

    - #### _enumIndex

          protected int _enumIndex

      Index of the enum that was read as the current token. This is cleared when the next token is read.
      Since:
        2.9

    - #### _numberFloat

          protected float _numberFloat

      Value if decoded directly as `float`.

      NOTE: base class (`ParserBase`) has other value storage, but since JSON has no distinction between double, float, only includes `float`.

      Since:
        2.9

  - ### Constructor Detail

    - #### AvroParserImpl

          protected AvroParserImpl(com.fasterxml.jackson.core.io.IOContext ctxt,
                        int parserFeatures,
                        int avroFeatures,
                        com.fasterxml.jackson.core.ObjectCodec codec)

  - ### Method Detail

    - #### overrideFormatFeatures

          public final com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values,
                                                                     int mask)

      Specified by:
        `overrideFormatFeatures` in class `AvroParser`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### nextToken

          public com.fasterxml.jackson.core.JsonToken nextToken()
                                                         throws IOException

      Specified by:
        `nextToken` in class `AvroParser`
      Throws:
        `IOException`

    - #### nextFieldName

          public String nextFieldName()
                               throws IOException

      Overrides:
        `nextFieldName` in class `com.fasterxml.jackson.core.JsonParser`
      Throws:
        `IOException`

    - #### nextFieldName

          public boolean nextFieldName(com.fasterxml.jackson.core.SerializableString sstr)
                                throws IOException

      Overrides:
        `nextFieldName` in class `com.fasterxml.jackson.core.JsonParser`
      Throws:
        `IOException`

    - #### nextTextValue

          public abstract String nextTextValue()
                                        throws IOException

      Overrides:
        `nextTextValue` in class `com.fasterxml.jackson.core.JsonParser`
      Throws:
        `IOException`

    - #### _initSchema

          public final void _initSchema(AvroSchema schema)
                                 throws com.fasterxml.jackson.core.JsonProcessingException

      Specified by:
        `_initSchema` in class `AvroParser`
      Throws:
        `com.fasterxml.jackson.core.JsonProcessingException`

    - #### skipValue

          public final void skipValue()
                               throws IOException

      Skip to the end of the current structure (array/map/object); This is different from `skipMap()` and `skipArray()` 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:
        `IOException` - If there was an issue advancing through the underlying data stream

    - #### isNaN

          public final boolean isNaN()

      Overrides:
        `isNaN` in class `com.fasterxml.jackson.core.base.ParserBase`

    - #### getNumberValue

          public final Number getNumberValue()
                                      throws IOException

      Overrides:
        `getNumberValue` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### getNumberType

          public final com.fasterxml.jackson.core.JsonParser.NumberType getNumberType()
                                                                               throws IOException

      Overrides:
        `getNumberType` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### getFloatValue

          public final float getFloatValue()
                                    throws IOException

      Overrides:
        `getFloatValue` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### _checkNumericValue

          protected final void _checkNumericValue(int expType)
                                           throws IOException

      Throws:
        `IOException`

    - #### convertNumberToInt

          protected final void convertNumberToInt()
                                           throws IOException

      Overrides:
        `convertNumberToInt` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### convertNumberToLong

          protected final void convertNumberToLong()
                                            throws IOException

      Overrides:
        `convertNumberToLong` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### convertNumberToBigInteger

          protected final void convertNumberToBigInteger()
                                                  throws IOException

      Overrides:
        `convertNumberToBigInteger` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### convertNumberToFloat

          protected final void convertNumberToFloat()
                                             throws IOException

      Throws:
        `IOException`

    - #### convertNumberToDouble

          protected final void convertNumberToDouble()
                                              throws IOException

      Overrides:
        `convertNumberToDouble` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### convertNumberToBigDecimal

          protected final void convertNumberToBigDecimal()
                                                  throws IOException

      Overrides:
        `convertNumberToBigDecimal` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### checkInputEnd

          public abstract boolean checkInputEnd()
                                         throws IOException

      Throws:
        `IOException`

    - #### getRemainingElements

          public long getRemainingElements()

      Returns the remaining number of elements in the current block of a map or array

    - #### decodeIntToken

          public abstract com.fasterxml.jackson.core.JsonToken decodeIntToken()
                                                                       throws IOException

      Throws:
        `IOException`

    - #### decodeInt

          public abstract int decodeInt()
                                 throws IOException

      Throws:
        `IOException`

    - #### skipInt

          public abstract void skipInt()
                                throws IOException

      Throws:
        `IOException`

    - #### decodeLongToken

          public abstract com.fasterxml.jackson.core.JsonToken decodeLongToken()
                                                                        throws IOException

      Throws:
        `IOException`

    - #### decodeLong

          public abstract long decodeLong()
                                   throws IOException

      Throws:
        `IOException`

    - #### skipLong

          public abstract void skipLong()
                                 throws IOException

      Throws:
        `IOException`

    - #### decodeFloat

          public abstract com.fasterxml.jackson.core.JsonToken decodeFloat()
                                                                    throws IOException

      Throws:
        `IOException`

    - #### skipFloat

          public abstract void skipFloat()
                                  throws IOException

      Throws:
        `IOException`

    - #### decodeDouble

          public abstract com.fasterxml.jackson.core.JsonToken decodeDouble()
                                                                     throws IOException

      Throws:
        `IOException`

    - #### skipDouble

          public abstract void skipDouble()
                                   throws IOException

      Throws:
        `IOException`

    - #### decodeStringToken

          public abstract com.fasterxml.jackson.core.JsonToken decodeStringToken()
                                                                          throws IOException

      Throws:
        `IOException`

    - #### decodeString

          public abstract void decodeString()
                                     throws IOException

      Throws:
        `IOException`

    - #### skipString

          public abstract void skipString()
                                   throws IOException

      Throws:
        `IOException`

    - #### decodeBytes

          public abstract com.fasterxml.jackson.core.JsonToken decodeBytes()
                                                                    throws IOException

      Throws:
        `IOException`

    - #### skipBytes

          public abstract void skipBytes()
                                  throws IOException

      Throws:
        `IOException`

    - #### decodeFixed

          public abstract com.fasterxml.jackson.core.JsonToken decodeFixed(int size)
                                                                    throws IOException

      Throws:
        `IOException`

    - #### skipFixed

          public abstract void skipFixed(int size)
                                  throws IOException

      Throws:
        `IOException`

    - #### decodeArrayStart

          public abstract long decodeArrayStart()
                                         throws IOException

      Throws:
        `IOException`

    - #### decodeArrayNext

          public abstract long decodeArrayNext()
                                        throws IOException

      Throws:
        `IOException`

    - #### skipArray

          public abstract long skipArray()
                                  throws IOException

      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

          public abstract String decodeMapKey()
                                       throws IOException

      Throws:
        `IOException`

    - #### decodeMapStart

          public abstract long decodeMapStart()
                                       throws IOException

      Throws:
        `IOException`

    - #### decodeMapNext

          public abstract long decodeMapNext()
                                      throws IOException

      Throws:
        `IOException`

    - #### skipMap

          public abstract long skipMap()
                                throws IOException

      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

          public abstract com.fasterxml.jackson.core.JsonToken decodeBoolean()
                                                                      throws IOException

      Throws:
        `IOException`

    - #### skipBoolean

          public abstract void skipBoolean()
                                    throws IOException

      Throws:
        `IOException`

    - #### decodeIndex

          public abstract int decodeIndex()
                                   throws IOException

      Throws:
        `IOException`

    - #### decodeEnum

          public abstract int decodeEnum()
                                  throws IOException

      Throws:
        `IOException`

    - #### branchIndex

          public final int branchIndex()

    - #### enumIndex

          public final int enumIndex()

    - #### isRecord

          public final boolean isRecord()

    - #### setAvroContext

          public final void setAvroContext(AvroReadContext ctxt)

    - #### setBytes

          protected final com.fasterxml.jackson.core.JsonToken setBytes(byte[] b)

    - #### setNumber

          protected final com.fasterxml.jackson.core.JsonToken setNumber(int v)

    - #### setNumber

          protected final com.fasterxml.jackson.core.JsonToken setNumber(long v)

    - #### setNumber

          protected final com.fasterxml.jackson.core.JsonToken setNumber(float v)

    - #### setNumber

          protected final com.fasterxml.jackson.core.JsonToken setNumber(double v)

    - #### setString

          protected abstract com.fasterxml.jackson.core.JsonToken setString(String str)

Copyright © 2017 FasterXML. All rights reserved.