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
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).
-
Field Summary
Fields inherited from class tools.jackson.dataformat.avro.deser.AvroReadContext
_currentValue, _currToken, _parent, _typeIdFields inherited from class tools.jackson.core.TokenStreamContext
_index, _nestingDepth, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAvroStructureReader(AvroReadContext parent, int type, String typeId) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> TbooleanMethod 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.abstract AvroStructureReadernewReader(AvroReadContext parent, AvroParserImpl parser) Method for creating actual instance to use for reading (initial instance constructed is so-called blueprint).abstract tools.jackson.core.JsonTokenabstract voidskipValue(AvroParserImpl parser) Alternative tonextToken()which will simply skip the full value.protected voidthrowIllegalState(int state) Methods inherited from class tools.jackson.dataformat.avro.deser.AvroReadContext
_reportError, appendDesc, assignCurrentValue, currentName, currentToken, currentValue, getParent, getRemainingElements, getTypeId, nextName, nextNameMatch, toStringMethods inherited from class tools.jackson.core.TokenStreamContext
getCurrentIndex, getEntryCount, getNestingDepth, hasCurrentIndex, hasCurrentName, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, startLocation, typeDesc
-
Constructor Details
-
AvroStructureReader
-
-
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
trueas they need to encode length even for "empty" arrays. -
newReader
Method for creating actual instance to use for reading (initial instance constructed is so-called blueprint). -
nextToken
- Specified by:
nextTokenin classAvroReadContext- Throws:
IOException
-
skipValue
Alternative tonextToken()which will simply skip the full value.- Specified by:
skipValuein classAvroReadContext- Throws:
IOException
-
throwIllegalState
protected void throwIllegalState(int state) -
_throwUnsupported
protected <T> T _throwUnsupported()
-