Class UniVocityCsvDataFormat
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.dataformat.univocity.AbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings,com.univocity.parsers.csv.CsvWriter,com.univocity.parsers.csv.CsvParserSettings,com.univocity.parsers.csv.CsvParser,UniVocityCsvDataFormat>
org.apache.camel.dataformat.univocity.UniVocityCsvDataFormat
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.DataFormat,org.apache.camel.spi.DataFormatName,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@Dataformat("univocityCsv")
public class UniVocityCsvDataFormat
extends AbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings,com.univocity.parsers.csv.CsvWriter,com.univocity.parsers.csv.CsvParserSettings,com.univocity.parsers.csv.CsvParser,UniVocityCsvDataFormat>
This class is the data format that uses the CSV uniVocity parser.
-
Field Summary
Fields inherited from class org.apache.camel.dataformat.univocity.AbstractUniVocityDataFormat
asMap, comment, emptyValue, headerExtractionEnabled, headers, headersDisabled, ignoreLeadingWhitespaces, ignoreTrailingWhitespaces, lazyLoad, lineSeparator, normalizedLineSeparator, nullValue, numberOfRecordsToRead, skipEmptyLinesFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureFormat(com.univocity.parsers.csv.CsvFormat format) Configures the format.protected voidconfigureParserSettings(com.univocity.parsers.csv.CsvParserSettings settings) Configure the parser settings.protected voidconfigureWriterSettings(com.univocity.parsers.csv.CsvWriterSettings settings) Configures the writer settings.protected com.univocity.parsers.csv.CsvParsercreateParser(com.univocity.parsers.csv.CsvParserSettings settings) Creates a new instance of the uniVocity parser.protected com.univocity.parsers.csv.CsvParserSettingsCreates a new instance of the parser settings.protected com.univocity.parsers.csv.CsvWritercreateWriter(Writer writer, com.univocity.parsers.csv.CsvWriterSettings settings) Creates a new instance of the uniVocity writer.protected com.univocity.parsers.csv.CsvWriterSettingsCreates a new instance of the writer settings.getQuote()voidsetDelimiter(Character delimiter) voidvoidsetQuoteAllFields(Boolean quoteAllFields) voidsetQuoteEscape(Character quoteEscape) Methods inherited from class org.apache.camel.dataformat.univocity.AbstractUniVocityDataFormat
doStart, doStop, getComment, getEmptyValue, getHeaderExtractionEnabled, getHeaderRowProcessor, getHeaders, getIgnoreLeadingWhitespaces, getIgnoreTrailingWhitespaces, getLineSeparator, getMarshaller, getNormalizedLineSeparator, getNullValue, getNumberOfRecordsToRead, getParserSettings, getSkipEmptyLines, getUnmarshaller, getWriterSettings, isAsMap, isHeadersDisabled, isLazyLoad, marshal, setAsMap, setComment, setEmptyValue, setHeaderExtractionEnabled, setHeaders, setHeadersDisabled, setIgnoreLeadingWhitespaces, setIgnoreTrailingWhitespaces, setLazyLoad, setLineSeparator, setMarshaller, setNormalizedLineSeparator, setNullValue, setNumberOfRecordsToRead, setParserSettings, setSkipEmptyLines, setUnmarshaller, setWriterSettings, unmarshalMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.spi.DataFormat
unmarshalMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
UniVocityCsvDataFormat
public UniVocityCsvDataFormat()
-
-
Method Details
-
getQuoteAllFields
-
setQuoteAllFields
-
getQuote
-
setQuote
-
getQuoteEscape
-
setQuoteEscape
-
getDelimiter
-
setDelimiter
-
createWriterSettings
protected com.univocity.parsers.csv.CsvWriterSettings createWriterSettings()Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the writer settings.- Specified by:
createWriterSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Returns:
- New instance of the writer settings
-
configureWriterSettings
protected void configureWriterSettings(com.univocity.parsers.csv.CsvWriterSettings settings) Description copied from class:AbstractUniVocityDataFormatConfigures the writer settings.- Overrides:
configureWriterSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Parameters:
settings- Writer settings to configure
-
createWriter
protected com.univocity.parsers.csv.CsvWriter createWriter(Writer writer, com.univocity.parsers.csv.CsvWriterSettings settings) Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the uniVocity writer.- Specified by:
createWriterin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Parameters:
writer- Output writer to usesettings- Writer settings to use- Returns:
- New uinstance of the uniVocity writer
-
createParserSettings
protected com.univocity.parsers.csv.CsvParserSettings createParserSettings()Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the parser settings.- Specified by:
createParserSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Returns:
- New instance of the parser settings
-
configureParserSettings
protected void configureParserSettings(com.univocity.parsers.csv.CsvParserSettings settings) Description copied from class:AbstractUniVocityDataFormatConfigure the parser settings.- Overrides:
configureParserSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Parameters:
settings- Parser settings to configure
-
createParser
protected com.univocity.parsers.csv.CsvParser createParser(com.univocity.parsers.csv.CsvParserSettings settings) Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the uniVocity parser.- Specified by:
createParserin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Parameters:
settings- Parser settings to use- Returns:
- New instance of the uniVocity parser
-
configureFormat
protected void configureFormat(com.univocity.parsers.csv.CsvFormat format) Description copied from class:AbstractUniVocityDataFormatConfigures the format.- Overrides:
configureFormatin classAbstractUniVocityDataFormat<com.univocity.parsers.csv.CsvFormat,com.univocity.parsers.csv.CsvWriterSettings, com.univocity.parsers.csv.CsvWriter, com.univocity.parsers.csv.CsvParserSettings, com.univocity.parsers.csv.CsvParser, UniVocityCsvDataFormat> - Parameters:
format- format to configure
-
getDataFormatName
-