Class UniVocityFixedDataFormat
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.dataformat.univocity.AbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings,com.univocity.parsers.fixed.FixedWidthWriter,com.univocity.parsers.fixed.FixedWidthParserSettings,com.univocity.parsers.fixed.FixedWidthParser,UniVocityFixedDataFormat>
org.apache.camel.dataformat.univocity.UniVocityFixedDataFormat
- 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("univocityFixed")
public class UniVocityFixedDataFormat
extends AbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings,com.univocity.parsers.fixed.FixedWidthWriter,com.univocity.parsers.fixed.FixedWidthParserSettings,com.univocity.parsers.fixed.FixedWidthParser,UniVocityFixedDataFormat>
This class is the data format that uses the fixed-width 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.fixed.FixedWidthFormat format) Configures the format.protected voidconfigureParserSettings(com.univocity.parsers.fixed.FixedWidthParserSettings settings) Configure the parser settings.protected com.univocity.parsers.fixed.FixedWidthParsercreateParser(com.univocity.parsers.fixed.FixedWidthParserSettings settings) Creates a new instance of the uniVocity parser.protected com.univocity.parsers.fixed.FixedWidthParserSettingsCreates a new instance of the parser settings.protected com.univocity.parsers.fixed.FixedWidthWritercreateWriter(Writer writer, com.univocity.parsers.fixed.FixedWidthWriterSettings settings) Creates a new instance of the uniVocity writer.protected com.univocity.parsers.fixed.FixedWidthWriterSettingsCreates a new instance of the writer settings.int[]voidsetFieldLengths(String fieldLengths) voidsetPadding(Character padding) voidsetRecordEndsOnNewline(Boolean recordEndsOnNewline) voidsetSkipTrailingCharsUntilNewline(Boolean skipTrailingCharsUntilNewline) Methods inherited from class org.apache.camel.dataformat.univocity.AbstractUniVocityDataFormat
configureWriterSettings, 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
-
UniVocityFixedDataFormat
public UniVocityFixedDataFormat()
-
-
Method Details
-
fieldLengthsAsArray
public int[] fieldLengthsAsArray() -
getFieldLengths
-
setFieldLengths
-
getSkipTrailingCharsUntilNewline
-
setSkipTrailingCharsUntilNewline
-
getRecordEndsOnNewline
-
setRecordEndsOnNewline
-
getPadding
-
setPadding
-
createWriterSettings
protected com.univocity.parsers.fixed.FixedWidthWriterSettings createWriterSettings()Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the writer settings.- Specified by:
createWriterSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings, com.univocity.parsers.fixed.FixedWidthWriter, com.univocity.parsers.fixed.FixedWidthParserSettings, com.univocity.parsers.fixed.FixedWidthParser, UniVocityFixedDataFormat> - Returns:
- New instance of the writer settings
-
createWriter
protected com.univocity.parsers.fixed.FixedWidthWriter createWriter(Writer writer, com.univocity.parsers.fixed.FixedWidthWriterSettings settings) Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the uniVocity writer.- Specified by:
createWriterin classAbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings, com.univocity.parsers.fixed.FixedWidthWriter, com.univocity.parsers.fixed.FixedWidthParserSettings, com.univocity.parsers.fixed.FixedWidthParser, UniVocityFixedDataFormat> - Parameters:
writer- Output writer to usesettings- Writer settings to use- Returns:
- New uinstance of the uniVocity writer
-
createParserSettings
protected com.univocity.parsers.fixed.FixedWidthParserSettings createParserSettings()Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the parser settings.- Specified by:
createParserSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings, com.univocity.parsers.fixed.FixedWidthWriter, com.univocity.parsers.fixed.FixedWidthParserSettings, com.univocity.parsers.fixed.FixedWidthParser, UniVocityFixedDataFormat> - Returns:
- New instance of the parser settings
-
configureParserSettings
protected void configureParserSettings(com.univocity.parsers.fixed.FixedWidthParserSettings settings) Description copied from class:AbstractUniVocityDataFormatConfigure the parser settings.- Overrides:
configureParserSettingsin classAbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings, com.univocity.parsers.fixed.FixedWidthWriter, com.univocity.parsers.fixed.FixedWidthParserSettings, com.univocity.parsers.fixed.FixedWidthParser, UniVocityFixedDataFormat> - Parameters:
settings- Parser settings to configure
-
createParser
protected com.univocity.parsers.fixed.FixedWidthParser createParser(com.univocity.parsers.fixed.FixedWidthParserSettings settings) Description copied from class:AbstractUniVocityDataFormatCreates a new instance of the uniVocity parser.- Specified by:
createParserin classAbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings, com.univocity.parsers.fixed.FixedWidthWriter, com.univocity.parsers.fixed.FixedWidthParserSettings, com.univocity.parsers.fixed.FixedWidthParser, UniVocityFixedDataFormat> - Parameters:
settings- Parser settings to use- Returns:
- New instance of the uniVocity parser
-
configureFormat
protected void configureFormat(com.univocity.parsers.fixed.FixedWidthFormat format) Description copied from class:AbstractUniVocityDataFormatConfigures the format.- Overrides:
configureFormatin classAbstractUniVocityDataFormat<com.univocity.parsers.fixed.FixedWidthFormat,com.univocity.parsers.fixed.FixedWidthWriterSettings, com.univocity.parsers.fixed.FixedWidthWriter, com.univocity.parsers.fixed.FixedWidthParserSettings, com.univocity.parsers.fixed.FixedWidthParser, UniVocityFixedDataFormat> - Parameters:
format- format to configure
-
getDataFormatName
-