com.fasterxml.jackson.dataformat.avro

## Class AvroParser

- 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

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

      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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AvroParser.Feature` Enumeration that defines all togglable features for Avro parsers.

    - ### 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 AvroReadContext` | `_avroContext`
    `protected int` | `_formatFeatures`
    `protected com.fasterxml.jackson.core.ObjectCodec` | `_objectCodec` Codec used for data binding when (if) requested.
    `protected AvroSchema` | `_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_BYTES, 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` | `AvroParser(com.fasterxml.jackson.core.io.IOContext ctxt, int parserFeatures, int avroFeatures, com.fasterxml.jackson.core.ObjectCodec codec)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    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()`
    `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()`

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

      `_checkStdFeatureChanges, _decodeBase64Escape, _decodeBase64Escape, _decodeEscaped, _eofAsNextChar, _getByteArrayBuilder, _getSourceReference, _handleBase64MissingPadding, _handleEOF, _handleUnrecognizedCharacterEscape, _parseIntValue, _parseNumericValue, _releaseBuffers, _reportMismatchedEndMarker, _reportTooLongIntegral, _throwUnquotedSpace, _validJsonTokenList, _validJsonValueList, close, convertNumberToBigDecimal, convertNumberToBigInteger, convertNumberToDouble, convertNumberToInt, convertNumberToLong, disable, enable, getBigIntegerValue, getCurrentValue, getDecimalValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNumberType, getNumberValue, getParsingContext, getTokenCharacterOffset, getTokenColumnNr, getTokenLineNr, growArrayBy, isClosed, isNaN, 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, _hasTextualNull, _longIntegerDesc, _longNumberDesc, _reportError, _reportError, _reportError, _reportInputCoercion, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOF, _reportInvalidEOFInValue, _reportInvalidEOFInValue, _reportMissingRootWS, _reportUnexpectedChar, _throwInternal, _throwInvalidSpace, _wrapError, clearCurrentToken, currentToken, currentTokenId, getCurrentToken, getCurrentTokenId, getLastClearedToken, getValueAsBoolean, getValueAsDouble, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsLong, getValueAsString, getValueAsString, hasCurrentToken, hasToken, hasTokenId, isExpectedStartArrayToken, isExpectedStartObjectToken, nextValue, reportInvalidNumber, reportOverflowInt, reportOverflowInt, reportOverflowInt, reportOverflowLong, reportOverflowLong, reportOverflowLong, reportUnexpectedNumberChar, skipChildren`

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

      `_codec, _constructError, _reportUnsupportedOperation, canParseAsync, canReadObjectId, configure, currentName, 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`

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

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

- - ### Field Detail

    - #### _objectCodec

          protected com.fasterxml.jackson.core.ObjectCodec _objectCodec

      Codec used for data binding when (if) requested.

    - #### _rootSchema

          protected AvroSchema _rootSchema

    - #### _formatFeatures

          protected int _formatFeatures

    - #### _avroContext

          protected AvroReadContext _avroContext

  - ### Constructor Detail

    - #### AvroParser

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

  - ### Method Detail

    - #### getCodec

          public com.fasterxml.jackson.core.ObjectCodec getCodec()

      Specified by:
        `getCodec` in class `com.fasterxml.jackson.core.JsonParser`

    - #### setCodec

          public void setCodec(com.fasterxml.jackson.core.ObjectCodec c)

      Specified by:
        `setCodec` in class `com.fasterxml.jackson.core.JsonParser`

    - #### getInputSource

          public abstract Object getInputSource()

      Overrides:
        `getInputSource` in class `com.fasterxml.jackson.core.JsonParser`

    - #### overrideFormatFeatures

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

      Overrides:
        `overrideFormatFeatures` in class `com.fasterxml.jackson.core.JsonParser`

    - #### version

          public com.fasterxml.jackson.core.Version version()

      Specified by:
        `version` in interface `com.fasterxml.jackson.core.Versioned`
      Overrides:
        `version` in class `com.fasterxml.jackson.core.base.ParserBase`

    - #### _finishString

          protected void _finishString()
                                throws IOException

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

    - #### _closeInput

          protected abstract void _closeInput()
                                       throws IOException

      Specified by:
        `_closeInput` in class `com.fasterxml.jackson.core.base.ParserBase`
      Throws:
        `IOException`

    - #### enable

          public com.fasterxml.jackson.core.JsonParser enable(AvroParser.Feature f)

      Method for enabling specified Avro feature (check `AvroParser.Feature` for list of features)

    - #### disable

          public com.fasterxml.jackson.core.JsonParser disable(AvroParser.Feature f)

      Method for disabling specified Avro feature (check `AvroParser.Feature` for list of features)

    - #### configure

          public 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)

    - #### isEnabled

          public boolean isEnabled(AvroParser.Feature f)

      Method for checking whether specified Avro `AvroParser.Feature` is enabled.

    - #### canUseSchema

          public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)

      Overrides:
        `canUseSchema` in class `com.fasterxml.jackson.core.JsonParser`

    - #### getSchema

          public AvroSchema getSchema()

      Overrides:
        `getSchema` in class `com.fasterxml.jackson.core.JsonParser`

    - #### setSchema

          public void setSchema(com.fasterxml.jackson.core.FormatSchema schema)

      Overrides:
        `setSchema` in class `com.fasterxml.jackson.core.JsonParser`

    - #### _initSchema

          protected abstract void _initSchema(AvroSchema schema)
                                       throws com.fasterxml.jackson.core.JsonProcessingException

      Throws:
        `com.fasterxml.jackson.core.JsonProcessingException`

    - #### canReadTypeId

          public boolean canReadTypeId()

      Overrides:
        `canReadTypeId` in class `com.fasterxml.jackson.core.JsonParser`

    - #### getTypeId

          public Object getTypeId()
                           throws IOException

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

    - #### getTokenLocation

          public com.fasterxml.jackson.core.JsonLocation getTokenLocation()

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

    - #### getCurrentLocation

          public com.fasterxml.jackson.core.JsonLocation getCurrentLocation()

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

    - #### nextToken

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

      Specified by:
        `nextToken` in class `com.fasterxml.jackson.core.base.ParserMinimalBase`
      Throws:
        `IOException`

    - #### hasTextCharacters

          public abstract boolean hasTextCharacters()

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

    - #### getText

          public abstract String getText()
                                  throws IOException

      Specified by:
        `getText` in class `com.fasterxml.jackson.core.base.ParserMinimalBase`
      Throws:
        `IOException`

    - #### getText

          public abstract int getText(Writer writer)
                               throws IOException

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

    - #### getCurrentName

          public String getCurrentName()
                                throws IOException

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

    - #### overrideCurrentName

          public void overrideCurrentName(String name)

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

    - #### getTextCharacters

          public char[] getTextCharacters()
                                   throws IOException

      Specified by:
        `getTextCharacters` in class `com.fasterxml.jackson.core.base.ParserMinimalBase`
      Throws:
        `IOException`

    - #### getTextLength

          public int getTextLength()
                            throws IOException

      Specified by:
        `getTextLength` in class `com.fasterxml.jackson.core.base.ParserMinimalBase`
      Throws:
        `IOException`

    - #### getTextOffset

          public int getTextOffset()
                            throws IOException

      Specified by:
        `getTextOffset` in class `com.fasterxml.jackson.core.base.ParserMinimalBase`
      Throws:
        `IOException`

    - #### getEmbeddedObject

          public Object getEmbeddedObject()
                                   throws IOException

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

    - #### getBinaryValue

          public byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant variant)
                                throws IOException

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

Copyright © 2019 FasterXML. All rights reserved.