Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.avro.apacheimpl

public Class ApacheAvroFactory

extends AvroFactory
Class Inheritance
Imports
java.io.IOException, .InputStream, com.fasterxml.jackson.core.ObjectCodec, com.fasterxml.jackson.core.io.IOContext, com.fasterxml.jackson.dataformat.avro.AvroFactory, .AvroParser

Alternative AvroFactory implementation that uses codecs from Apache Avro library instead of Jackson "native" codecs.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.dataformat.avro.AvroFactory:
_avroGeneratorFeatures_avroParserFeatures_avroRecyclerPool_useApacheLibDecoderFORMAT_NAME_AVRO

Constructor Summary

AccessConstructor and Description
public
public
protected

Method Summary

Modifier and TypeMethod and Description
protected AvroParser
_createParser(InputStream
InputStream to use for reading content to parse
in
,
IOContext
I/O context to use for parsing
ctxt
)

Overrides com.fasterxml.jackson.dataformat.avro.AvroFactory._createParser.

Overridable factory method that actually instantiates desired parser.

protected AvroParser
_createParser(byte[]
Buffer that contains content to parse
data
,
int
Offset to the first character of data to parse
offset
,
int
Number of characters within buffer to parse
len
,
IOContext
I/O context to use for parsing
ctxt
)

Overrides com.fasterxml.jackson.dataformat.avro.AvroFactory._createParser.

Overridable factory method that actually instantiates parser using given Reader object for reading content passed as raw byte array.

public AvroFactory
copy()

Overrides com.fasterxml.jackson.dataformat.avro.AvroFactory.copy.

Method for constructing a new JsonFactory that has the same settings as this instance, but is otherwise independent (i.e. nothing is actually shared, symbol tables are separate).

Inherited from com.fasterxml.jackson.dataformat.avro.AvroFactory:
_createGenerator_createGenerator_createParser_createParser_createWriter_nonByteSource_nonByteTargetbuilderbuilderWithApacheDecoderbuilderWithNativeDecodercanHandleBinaryNativelycanUseSchemaconfigureconfigurecreateGeneratorcreateGeneratorcreateParsercreateParsercreateParsercreateParsercreateParserdisabledisableenableenablegetFormatGeneratorFeaturesgetFormatNamegetFormatParserFeatureshasFormatisEnabledisEnabledreadResolverebuildrequiresPropertyOrderingversion

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.dataformat.avro.AvroFactory.serialVersionUID.

Constructor Detail

ApacheAvroFactoryback to summary
public ApacheAvroFactory()
ApacheAvroFactoryback to summary
public ApacheAvroFactory(ObjectCodec oc)
ApacheAvroFactoryback to summary
protected ApacheAvroFactory(AvroFactory src, ObjectCodec oc)

Method Detail

_createParserback to summary
protected AvroParser _createParser(InputStream in, IOContext ctxt) throws IOException

Overrides com.fasterxml.jackson.dataformat.avro.AvroFactory._createParser.

Doc from com.fasterxml.jackson.dataformat.avro.AvroFactory._createParser.

Overridable factory method that actually instantiates desired parser.

Parameters
in:InputStream

Doc from com.fasterxml.jackson.core.JsonFactory._createParser.

InputStream to use for reading content to parse

ctxt:IOContext

Doc from com.fasterxml.jackson.core.JsonFactory._createParser.

I/O context to use for parsing

Returns:AvroParser

Doc from com.fasterxml.jackson.core.JsonFactory._createParser.

Parser constructed

Annotations
@Override
Exceptions
IOException:

Doc from com.fasterxml.jackson.core.JsonFactory._createParser.

if parser initialization fails due to I/O (read) problem

_createParserback to summary
protected AvroParser _createParser(byte[] data, int offset, int len, IOContext ctxt) throws IOException

Overrides com.fasterxml.jackson.dataformat.avro.AvroFactory._createParser.

Doc from com.fasterxml.jackson.core.JsonFactory._createParser.

Overridable factory method that actually instantiates parser using given Reader object for reading content passed as raw byte array.

This method is specifically designed to remain compatible between minor versions so that sub-classes can count on it being called as expected. That is, it is part of official interface from sub-class perspective, although not a public method available to users of factory implementations.

Parameters
data:byte[]

Buffer that contains content to parse

offset:int

Offset to the first character of data to parse

len:int

Number of characters within buffer to parse

ctxt:IOContext

I/O context to use for parsing

Returns:AvroParser

Actual parser to use

Annotations
@Override
Exceptions
IOException:
if parser initialization fails due to I/O (read) problem
copyback to summary
public AvroFactory copy()

Overrides com.fasterxml.jackson.dataformat.avro.AvroFactory.copy.

Doc from com.fasterxml.jackson.core.JsonFactory.copy.

Method for constructing a new JsonFactory that has the same settings as this instance, but is otherwise independent (i.e. nothing is actually shared, symbol tables are separate). Note that ObjectCodec reference is not copied but is set to null; caller typically needs to set it after calling this method. Reason for this is that the codec is used for callbacks, and assumption is that there is strict 1-to-1 mapping between codec, factory. Caller has to, then, explicitly set codec after making the copy.

Returns:AvroFactory

Copy of this factory instance

Annotations
@Override