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 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.

    - ### 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, CHAR_NULL, INT_0, INT_9, INT_MINUS, INT_PLUS, NR_BIGDECIMAL, NR_BIGINT, NR_DOUBLE, NR_INT, NR_LONG, NR_UNKNOWN`

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

      `_currToken, _lastClearedToken, INT_BACKSLASH, INT_COLON, INT_COMMA, INT_CR, INT_e, INT_E, INT_HASH, INT_LBRACKET, INT_LCURLY, INT_LF, INT_PERIOD, INT_QUOTE, INT_RBRACKET, INT_RCURLY, INT_SLASH, INT_SPACE, INT_TAB`

    - ### 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, 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)`

  - ### Method Summary

    Methods
    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()`

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

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

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

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

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

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

    - #### _input

          protected final InputStream _input

    - #### _avroContext

          protected AvroReadContext _avroContext

    - #### _textValue

          protected String _textValue

      We need to keep track of text values.

  - ### Constructor Detail

    - #### AvroParser

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

    - #### AvroParser

          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)

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

    - #### 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 boolean hasTextCharacters()

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

    - #### getText

          public String getText()
                         throws IOException

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

    - #### getText

          public 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 © 2016 FasterXML. All rights reserved.