Class AvroStructureReader

java.lang.Object
tools.jackson.core.TokenStreamContext
tools.jackson.dataformat.avro.deser.AvroReadContext
tools.jackson.dataformat.avro.deser.AvroStructureReader
Direct Known Subclasses:
ArrayReader, MapReader

public abstract class AvroStructureReader extends AvroReadContext
Base class for handlers for Avro structured types (or in some cases, scalar types that need to be exposed in unified way similar to structured types).
  • Constructor Details

  • Method Details

    • consumesNoContent

      public boolean consumesNoContent()
      Method that may be called to check if the values "read" by this reader are zero-length, that is, consume no content: most common example being Record with no fields.

      Note: Arrays can not return true as they need to encode length even for "empty" arrays.

    • newReader

      public abstract AvroStructureReader newReader(AvroReadContext parent, AvroParserImpl parser)
      Method for creating actual instance to use for reading (initial instance constructed is so-called blueprint).
    • nextToken

      public abstract tools.jackson.core.JsonToken nextToken() throws IOException
      Specified by:
      nextToken in class AvroReadContext
      Throws:
      IOException
    • skipValue

      public abstract void skipValue(AvroParserImpl parser) throws IOException
      Alternative to nextToken() which will simply skip the full value.
      Specified by:
      skipValue in class AvroReadContext
      Throws:
      IOException
    • throwIllegalState

      protected void throwIllegalState(int state)
    • _throwUnsupported

      protected <T> T _throwUnsupported()