Top Fields Constructors Methods
com.fasterxml.jackson.dataformat.csv

public Class CsvFactory

extends JsonFactory
Class Inheritance
Imports
java.io.*, java.net.URL, com.fasterxml.jackson.core.*, com.fasterxml.jackson.core.format.InputAccessor, .MatchStrength, com.fasterxml.jackson.core.io.IOContext, com.fasterxml.jackson.dataformat.csv.impl.CsvParserBootstrapper, .UTF8Reader, .UTF8Writer

Field Summary

Modifier and TypeField and Description
protected int
protected int
protected CsvSchema
pack-priv static final int
DEFAULT_CSV_GENERATOR_FEATURE_FLAGS

Bitfield (set of flags) of all generator features that are enabled by default.

pack-priv static final int
DEFAULT_CSV_PARSER_FEATURE_FLAGS

Bitfield (set of flags) of all parser features that are enabled by default.

protected static final CsvSchema
public static final String
FORMAT_NAME_CSV

Name used to identify CSV format.

private static final long
Inherited from com.fasterxml.jackson.core.JsonFactory:
_byteSymbolCanonicalizer_characterEscapes_errorReportConfiguration_factoryFeatures_generatorDecorators_generatorFeatures_inputDecorator_maximumNonEscapedChar_objectCodec_outputDecorator_parserFeatures_quoteChar_recyclerPool_rootCharSymbols_rootValueSeparator_streamReadConstraints_streamWriteConstraintsDEFAULT_FACTORY_FEATURE_FLAGSDEFAULT_GENERATOR_FEATURE_FLAGSDEFAULT_PARSER_FEATURE_FLAGSDEFAULT_QUOTE_CHARDEFAULT_ROOT_VALUE_SEPARATORFORMAT_NAME_JSON

Constructor Summary

AccessConstructor and Description
public
CsvFactory()

Default constructor used to create factory instances.

public
protected
protected
CsvFactory(CsvFactoryBuilder b)

Constructors used by CsvFactoryBuilder for instantiation.

Method Summary

Modifier and TypeMethod and Description
protected CsvGenerator
_createGenerator(Writer
Writer underlying writer to write generated content to
out
,
IOContext
I/O context to use
ctxt
)

Overrides com.fasterxml.jackson.core.JsonFactory._createGenerator.

Overridable factory method that actually instantiates generator for given Writer and context object.

protected CsvGenerator
protected CsvParser
_createParser(InputStream
InputStream to use for reading content to parse
in
,
IOContext
I/O context to use for parsing
ctxt
)

Overrides com.fasterxml.jackson.core.JsonFactory._createParser.

Overridable factory method that actually instantiates desired parser.

protected CsvParser
_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.core.JsonFactory._createParser.

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

protected CsvParser
_createParser(Reader
Reader to use for reading content to parse
r
,
IOContext
I/O context to use for parsing
ctxt
)

Overrides com.fasterxml.jackson.core.JsonFactory._createParser.

Overridable factory method that actually instantiates desired parser.

protected CsvParser
_createParser(char[]
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
,
boolean
Whether input buffer is recycled by the factory
recyclable
)

Overrides com.fasterxml.jackson.core.JsonFactory._createParser.

Overridable factory method that actually instantiates parser using given char[] object for accessing content.

protected Reader
protected Reader
_createReader(byte[] data, int offset, int len, JsonEncoding enc, IOContext ctxt)

protected CsvGenerator
_createUTF8Generator(OutputStream
OutputStream underlying writer to write generated content to
out
,
IOContext
I/O context to use
ctxt
)

Overrides com.fasterxml.jackson.core.JsonFactory._createUTF8Generator.

Overridable factory method that actually instantiates generator for given OutputStream and context object, using UTF-8 encoding.

protected Writer
public static CsvFactoryBuilder
builder()

Hides com.fasterxml.jackson.core.JsonFactory.builder.

Main factory method to use for constructing CsvFactory instances with different configuration.

public boolean
canUseCharArrays()

Overrides com.fasterxml.jackson.core.JsonFactory.canUseCharArrays.

Introspection method that can be used by base factory to check whether access using char[] is something that actual parser implementations can take advantage of, over having to use java.io.Reader.

public boolean
canUseSchema(FormatSchema
Schema instance to check
schema
)

Overrides com.fasterxml.jackson.core.JsonFactory.canUseSchema.

Method that can be used to quickly check whether given schema is something that parsers and/or generators constructed by this factory could use.

public final CsvFactory
configure(CsvParser.Feature f, boolean state)

Method for enabling or disabling specified parser feature (check CsvParser.Feature for list of features)

public final CsvFactory
configure(CsvGenerator.Feature f, boolean state)

Method for enabling or disabling specified generator feature (check CsvGenerator.Feature for list of features)

public CsvFactory
copy()

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

public CsvGenerator
createGenerator(OutputStream
OutputStream to use for writing JSON content
out
,
JsonEncoding
Character encoding to use
enc
)

Overrides com.fasterxml.jackson.core.JsonFactory.createGenerator.

Method for constructing JSON generator for writing JSON content using specified output stream.

public CsvGenerator
createGenerator(OutputStream out)

Overrides com.fasterxml.jackson.core.JsonFactory.createGenerator.

This method assumes use of UTF-8 for encoding.

public CsvGenerator
createGenerator(Writer
Writer to use for writing JSON content
out
)

Overrides com.fasterxml.jackson.core.JsonFactory.createGenerator.

Method for constructing JSON generator for writing JSON content using specified Writer.

public CsvGenerator
createGenerator(File
File to write contents to
f
,
JsonEncoding
Character encoding to use
enc
)

Overrides com.fasterxml.jackson.core.JsonFactory.createGenerator.

Method for constructing JSON generator for writing JSON content to specified file, overwriting contents it might have (or creating it if such file does not yet exist).

public CsvParser
createParser(File
File that contains JSON content to parse
f
)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing JSON parser instance to parse contents of specified file.

public CsvParser
createParser(URL
URL pointing to resource that contains JSON content to parse
url
)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing JSON parser instance to parse contents of resource reference by given URL.

public CsvParser
createParser(InputStream
InputStream to use for reading JSON content to parse
in
)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing JSON parser instance to parse the contents accessed via specified input stream.

public CsvParser
createParser(Reader
Reader to use for reading JSON content to parse
r
)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing parser for parsing the contents accessed via specified Reader.

public CsvParser
createParser(String doc)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing parser for parsing contents of given String.

public CsvParser
createParser(byte[] data)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing parser for parsing the contents of given byte array.

public CsvParser
createParser(byte[]
Buffer that contains data to parse
data
,
int
Offset of the first data byte within buffer
offset
,
int
Length of contents to parse within buffer
len
)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing parser for parsing the contents of given byte array.

public CsvParser
createParser(char[] data)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing parser for parsing contents of given char array.

public CsvParser
createParser(char[] data, int offset, int len)

Overrides com.fasterxml.jackson.core.JsonFactory.createParser.

Method for constructing parser for parsing contents of given char array.

public CsvFactory
disable(CsvParser.Feature f)

Method for disabling specified parser features (check CsvParser.Feature for list of features)

public CsvFactory
disable(CsvGenerator.Feature f)

Method for disabling specified generator feature (check CsvGenerator.Feature for list of features)

public CsvFactory
enable(CsvParser.Feature f)

Method for enabling specified parser feature (check CsvParser.Feature for list of features)

public CsvFactory
enable(CsvGenerator.Feature f)

Method for enabling specified generator features (check CsvGenerator.Feature for list of features)

public int
public String
getFormatName()

Overrides com.fasterxml.jackson.core.JsonFactory.getFormatName.

Method that returns short textual id identifying format this factory supports.

public int
public MatchStrength
public final boolean
isEnabled(CsvParser.Feature f)

Checked whether specified parser feature is enabled.

public final boolean
isEnabled(CsvGenerator.Feature f)

Check whether specified generator feature is enabled.

protected Object
readResolve()

Overrides com.fasterxml.jackson.core.JsonFactory.readResolve.

Method that we need to override to actually make restoration go through constructors etc. Also: must be overridden by sub-classes as well.

public CsvFactoryBuilder
rebuild()

Overrides com.fasterxml.jackson.core.JsonFactory.rebuild.

Method that allows construction of differently configured factory, starting with settings of this factory.

public boolean
requiresPropertyOrdering()

Overrides com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering.

Introspection method that higher-level functionality may call to see whether underlying data format requires a stable ordering of object properties or not.

public Version
version()

Overrides com.fasterxml.jackson.core.JsonFactory.version.

Implements com.fasterxml.jackson.core.Versioned.version.

Method called to detect version of the component that implements this interface; returned version should never be null, but may return specific "not available" instance (see Version for details).

Inherited from com.fasterxml.jackson.core.JsonFactory:
_checkInvalidCopy_copy_createContentReference_createContentReference_createContext_createContext_createNonBlockingContext_createParser_decorate_decorate_decorate_decorate_decorate_decorate_getBufferRecycler_getRecyclerPoolcanHandleBinaryNativelycanParseAsyncconfigureconfigureconfigurecreateGeneratorcreateGeneratorcreateJsonGeneratorcreateJsonGeneratorcreateJsonGeneratorcreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateJsonParsercreateNonBlockingByteArrayParsercreateNonBlockingByteBufferParsercreateParserdisabledisabledisableenableenableenablegetCharacterEscapesgetCodecgetFactoryFeaturesgetFormatReadFeatureTypegetFormatWriteFeatureTypegetGeneratorFeaturesgetInputDecoratorgetOutputDecoratorgetParserFeaturesgetRootValueSeparatorhasJSONFormatisEnabledisEnabledisEnabledisEnabledisEnabledrequiresCustomCodecsetCharacterEscapessetCodecsetErrorReportConfigurationsetInputDecoratorsetOutputDecoratorsetRecyclerPoolsetRootValueSeparatorsetStreamReadConstraintssetStreamWriteConstraintsstreamReadConstraintsstreamWriteConstraints