public class UniVocityFixedWidthDataFormat 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,UniVocityFixedWidthDataFormat>
Modifier and Type | Field and Description |
---|---|
protected int[] |
fieldLengths |
protected Character |
padding |
protected Boolean |
recordEndsOnNewline |
protected Boolean |
skipTrailingCharsUntilNewline |
asMap, comment, emptyValue, headerExtractionEnabled, headers, headersDisabled, ignoreLeadingWhitespaces, ignoreTrailingWhitespaces, lazyLoad, lineSeparator, normalizedLineSeparator, nullValue, numberOfRecordsToRead, skipEmptyLines
Constructor and Description |
---|
UniVocityFixedWidthDataFormat() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureFormat(com.univocity.parsers.fixed.FixedWidthFormat format)
Configures the format.
|
protected void |
configureParserSettings(com.univocity.parsers.fixed.FixedWidthParserSettings settings)
Configure the parser settings.
|
protected com.univocity.parsers.fixed.FixedWidthParser |
createParser(com.univocity.parsers.fixed.FixedWidthParserSettings settings)
Creates a new instance of the uniVocity parser.
|
protected com.univocity.parsers.fixed.FixedWidthParserSettings |
createParserSettings()
Creates a new instance of the parser settings.
|
protected com.univocity.parsers.fixed.FixedWidthWriter |
createWriter(Writer writer,
com.univocity.parsers.fixed.FixedWidthWriterSettings settings)
Creates a new instance of the uniVocity writer.
|
protected com.univocity.parsers.fixed.FixedWidthWriterSettings |
createWriterSettings()
Creates a new instance of the writer settings.
|
String |
getDataFormatName() |
int[] |
getFieldLengths()
Gets the field lengths.
|
Character |
getPadding()
Gets the padding symbol.
|
Boolean |
getRecordEndsOnNewline()
Gets whether or not the record ends on new line.
|
Boolean |
getSkipTrailingCharsUntilNewline()
Gets whether or not trailing characters until new line must be ignored.
|
UniVocityFixedWidthDataFormat |
setFieldLengths(int[] fieldLengths)
Sets the field lengths
It's used to construct uniVocity
FixedWidthFields instance. |
UniVocityFixedWidthDataFormat |
setPadding(Character padding)
Sets the padding symbol.
|
UniVocityFixedWidthDataFormat |
setRecordEndsOnNewline(Boolean recordEndsOnNewline)
Sets whether or not the record ends on new line
|
UniVocityFixedWidthDataFormat |
setSkipTrailingCharsUntilNewline(Boolean skipTrailingCharsUntilNewline)
Sets whether or not trailing characters until new line must be ignored.
|
configureWriterSettings, doStart, doStop, getComment, getEmptyValue, getHeaderExtractionEnabled, getHeaders, getIgnoreLeadingWhitespaces, getIgnoreTrailingWhitespaces, getLineSeparator, getNormalizedLineSeparator, getNullValue, getNumberOfRecordsToRead, getSkipEmptyLines, isAsMap, isHeadersDisabled, isLazyLoad, marshal, setAsMap, setComment, setEmptyValue, setHeaderExtractionEnabled, setHeaders, setHeadersDisabled, setIgnoreLeadingWhitespaces, setIgnoreTrailingWhitespaces, setLazyLoad, setLineSeparator, setNormalizedLineSeparator, setNullValue, setNumberOfRecordsToRead, setSkipEmptyLines, unmarshal
protected int[] fieldLengths
protected Boolean skipTrailingCharsUntilNewline
protected Boolean recordEndsOnNewline
protected Character padding
public int[] getFieldLengths()
FixedWidthFields
instance.public UniVocityFixedWidthDataFormat setFieldLengths(int[] fieldLengths)
FixedWidthFields
instance.fieldLengths
- the field lengthpublic Boolean getSkipTrailingCharsUntilNewline()
FixedWidthParserSettings.getSkipTrailingCharsUntilNewline()
public UniVocityFixedWidthDataFormat setSkipTrailingCharsUntilNewline(Boolean skipTrailingCharsUntilNewline)
skipTrailingCharsUntilNewline
- whether or not trailing characters until new line must be ignoredFixedWidthParserSettings.setSkipTrailingCharsUntilNewline(boolean)
public Boolean getRecordEndsOnNewline()
FixedWidthParserSettings.getRecordEndsOnNewline()
public UniVocityFixedWidthDataFormat setRecordEndsOnNewline(Boolean recordEndsOnNewline)
recordEndsOnNewline
- whether or not the record ends on new lineFixedWidthParserSettings.setRecordEndsOnNewline(boolean)
public Character getPadding()
null
then the default format value is used.FixedWidthFormat.getPadding()
public UniVocityFixedWidthDataFormat setPadding(Character padding)
null
then the default format value is used.padding
- the padding symbolFixedWidthFormat.setPadding(char)
protected com.univocity.parsers.fixed.FixedWidthWriterSettings createWriterSettings()
createWriterSettings
in class 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,UniVocityFixedWidthDataFormat>
protected com.univocity.parsers.fixed.FixedWidthWriter createWriter(Writer writer, com.univocity.parsers.fixed.FixedWidthWriterSettings settings)
createWriter
in class 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,UniVocityFixedWidthDataFormat>
writer
- Output writer to usesettings
- Writer settings to useprotected com.univocity.parsers.fixed.FixedWidthParserSettings createParserSettings()
createParserSettings
in class 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,UniVocityFixedWidthDataFormat>
protected void configureParserSettings(com.univocity.parsers.fixed.FixedWidthParserSettings settings)
AbstractUniVocityDataFormat
configureParserSettings
in class 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,UniVocityFixedWidthDataFormat>
settings
- Parser settings to configureprotected com.univocity.parsers.fixed.FixedWidthParser createParser(com.univocity.parsers.fixed.FixedWidthParserSettings settings)
createParser
in class 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,UniVocityFixedWidthDataFormat>
settings
- Parser settings to useprotected void configureFormat(com.univocity.parsers.fixed.FixedWidthFormat format)
configureFormat
in class 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,UniVocityFixedWidthDataFormat>
format
- format to configurepublic String getDataFormatName()
Apache Camel