public class AvroFactory
extends com.fasterxml.jackson.core.JsonFactory
Modifier and Type | Field and Description |
---|---|
protected int |
_avroGeneratorFeatures |
protected int |
_avroParserFeatures |
static String |
FORMAT_NAME_AVRO |
_characterEscapes, _factoryFeatures, _generatorFeatures, _inputDecorator, _objectCodec, _outputDecorator, _parserFeatures, _recyclerRef, _rootByteSymbols, _rootCharSymbols, _rootValueSeparator, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS, FORMAT_NAME_JSON
Modifier | Constructor and Description |
---|---|
|
AvroFactory()
Default constructor used to create factory instances.
|
protected |
AvroFactory(AvroFactory src,
com.fasterxml.jackson.core.ObjectCodec oc) |
|
AvroFactory(com.fasterxml.jackson.core.ObjectCodec oc) |
Modifier and Type | Method and Description |
---|---|
protected AvroGenerator |
_createGenerator(OutputStream out,
com.fasterxml.jackson.core.io.IOContext ctxt) |
protected com.fasterxml.jackson.core.JsonGenerator |
_createGenerator(Writer out,
com.fasterxml.jackson.core.io.IOContext ctxt)
Overridable factory method that actually instantiates desired
generator.
|
protected AvroParser |
_createParser(byte[] data,
int offset,
int len,
com.fasterxml.jackson.core.io.IOContext ctxt)
Overridable factory method that actually instantiates desired
parser.
|
protected AvroParser |
_createParser(InputStream in,
com.fasterxml.jackson.core.io.IOContext ctxt)
Overridable factory method that actually instantiates desired
parser.
|
protected com.fasterxml.jackson.core.JsonParser |
_createParser(Reader r,
com.fasterxml.jackson.core.io.IOContext ctxt)
Overridable factory method that actually instantiates desired
parser.
|
protected Writer |
_createWriter(OutputStream out,
com.fasterxml.jackson.core.JsonEncoding enc,
com.fasterxml.jackson.core.io.IOContext ctxt) |
boolean |
canUseSchema(com.fasterxml.jackson.core.FormatSchema schema) |
AvroFactory |
configure(AvroGenerator.Feature f,
boolean state)
Method for enabling or disabling specified generator feature
(check
AvroGenerator.Feature for list of features) |
AvroFactory |
configure(AvroParser.Feature f,
boolean state)
Method for enabling or disabling specified parser feature
(check
AvroParser.Feature for list of features) |
AvroFactory |
copy() |
AvroGenerator |
createGenerator(OutputStream out)
Since Avro format always uses UTF-8 internally, no encoding need
to be passed to this method.
|
AvroGenerator |
createGenerator(OutputStream out,
com.fasterxml.jackson.core.JsonEncoding enc)
note: co-variant return type
|
AvroParser |
createParser(byte[] data) |
AvroParser |
createParser(byte[] data,
int offset,
int len) |
AvroParser |
createParser(File f) |
AvroParser |
createParser(InputStream in) |
AvroParser |
createParser(URL url) |
AvroFactory |
disable(AvroGenerator.Feature f)
Method for disabling specified generator feature
(check
AvroGenerator.Feature for list of features) |
AvroFactory |
disable(AvroParser.Feature f)
Method for disabling specified parser features
(check
AvroParser.Feature for list of features) |
AvroFactory |
enable(AvroGenerator.Feature f)
Method for enabling specified generator features
(check
AvroGenerator.Feature for list of features) |
AvroFactory |
enable(AvroParser.Feature f)
Method for enabling specified parser feature
(check
AvroParser.Feature for list of features) |
String |
getFormatName() |
com.fasterxml.jackson.core.format.MatchStrength |
hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
Sub-classes need to override this method
|
boolean |
isEnabled(AvroGenerator.Feature f)
Check whether specified generator feature is enabled.
|
boolean |
isEnabled(AvroParser.Feature f)
Checked whether specified parser feature is enabled.
|
protected Object |
readResolve()
Method that we need to override to actually make restoration go
through constructors etc.
|
boolean |
requiresPropertyOrdering() |
com.fasterxml.jackson.core.Version |
version() |
_checkInvalidCopy, _createContext, _createJsonGenerator, _createJsonParser, _createJsonParser, _createJsonParser, _createUTF8Generator, _createUTF8JsonGenerator, _getBufferRecycler, _optimizedStreamFromURL, canHandleBinaryNatively, configure, configure, configure, createGenerator, createGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonGenerator, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createJsonParser, createParser, createParser, disable, disable, disable, enable, enable, enable, getCharacterEscapes, getCodec, getInputDecorator, getOutputDecorator, getRootValueSeparator, hasJSONFormat, isEnabled, isEnabled, isEnabled, requiresCustomCodec, setCharacterEscapes, setCodec, setInputDecorator, setOutputDecorator, setRootValueSeparator
public static final String FORMAT_NAME_AVRO
protected int _avroParserFeatures
protected int _avroGeneratorFeatures
public AvroFactory()
public AvroFactory(com.fasterxml.jackson.core.ObjectCodec oc)
protected AvroFactory(AvroFactory src, com.fasterxml.jackson.core.ObjectCodec oc)
public AvroFactory copy()
copy
in class com.fasterxml.jackson.core.JsonFactory
public boolean requiresPropertyOrdering()
requiresPropertyOrdering
in class com.fasterxml.jackson.core.JsonFactory
protected Object readResolve()
readResolve
in class com.fasterxml.jackson.core.JsonFactory
public com.fasterxml.jackson.core.Version version()
version
in interface com.fasterxml.jackson.core.Versioned
version
in class com.fasterxml.jackson.core.JsonFactory
public String getFormatName()
getFormatName
in class com.fasterxml.jackson.core.JsonFactory
public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
canUseSchema
in class com.fasterxml.jackson.core.JsonFactory
public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc) throws IOException
hasFormat
in class com.fasterxml.jackson.core.JsonFactory
IOException
public final AvroFactory configure(AvroParser.Feature f, boolean state)
AvroParser.Feature
for list of features)public AvroFactory enable(AvroParser.Feature f)
AvroParser.Feature
for list of features)public AvroFactory disable(AvroParser.Feature f)
AvroParser.Feature
for list of features)public final boolean isEnabled(AvroParser.Feature f)
public final AvroFactory configure(AvroGenerator.Feature f, boolean state)
AvroGenerator.Feature
for list of features)public AvroFactory enable(AvroGenerator.Feature f)
AvroGenerator.Feature
for list of features)public AvroFactory disable(AvroGenerator.Feature f)
AvroGenerator.Feature
for list of features)public final boolean isEnabled(AvroGenerator.Feature f)
public AvroParser createParser(File f) throws IOException, com.fasterxml.jackson.core.JsonParseException
createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
public AvroParser createParser(URL url) throws IOException, com.fasterxml.jackson.core.JsonParseException
createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
public AvroParser createParser(InputStream in) throws IOException, com.fasterxml.jackson.core.JsonParseException
createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
public AvroParser createParser(byte[] data) throws IOException, com.fasterxml.jackson.core.JsonParseException
createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
public AvroParser createParser(byte[] data, int offset, int len) throws IOException, com.fasterxml.jackson.core.JsonParseException
createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
public AvroGenerator createGenerator(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc) throws IOException
note: co-variant return type
createGenerator
in class com.fasterxml.jackson.core.JsonFactory
IOException
public AvroGenerator createGenerator(OutputStream out) throws IOException
createGenerator
in class com.fasterxml.jackson.core.JsonFactory
IOException
protected AvroParser _createParser(InputStream in, com.fasterxml.jackson.core.io.IOContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonParseException
_createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
protected com.fasterxml.jackson.core.JsonParser _createParser(Reader r, com.fasterxml.jackson.core.io.IOContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonParseException
_createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
protected AvroParser _createParser(byte[] data, int offset, int len, com.fasterxml.jackson.core.io.IOContext ctxt) throws IOException, com.fasterxml.jackson.core.JsonParseException
_createParser
in class com.fasterxml.jackson.core.JsonFactory
IOException
com.fasterxml.jackson.core.JsonParseException
protected com.fasterxml.jackson.core.JsonGenerator _createGenerator(Writer out, com.fasterxml.jackson.core.io.IOContext ctxt) throws IOException
_createGenerator
in class com.fasterxml.jackson.core.JsonFactory
IOException
protected Writer _createWriter(OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc, com.fasterxml.jackson.core.io.IOContext ctxt) throws IOException
_createWriter
in class com.fasterxml.jackson.core.JsonFactory
IOException
protected AvroGenerator _createGenerator(OutputStream out, com.fasterxml.jackson.core.io.IOContext ctxt) throws IOException
IOException
Copyright © 2012-2013 FasterXML. All Rights Reserved.