Interface FlatFileItemReaderBuilder.DelimitedSpec<T>
- Type Parameters:
T- the type of the parentFlatFileItemReaderBuilder
- Enclosing class:
FlatFileItemReaderBuilder<T>
public static interface FlatFileItemReaderBuilder.DelimitedSpec<T>
A specification for configuring a delimited file tokenizer.
- Since:
- 6.0
- Author:
- Michael Minella, Glenn Renfro, Mahmoud Ben Hassine, Drummond Dawson, Patrick Baumgartner, François Martin, Stefano Cordio, Daeho Kwon
-
Method Summary
Modifier and TypeMethodDescriptionaddIncludedField(int field) Add an index to the list of fields to be included from the fileDefine the delimiter for the file.fieldSetFactory(FieldSetFactory fieldSetFactory) A factory for creating the resultingFieldSet.includedFields(Integer... fields) A list of indices of the fields within a delimited file to be includedNames of each of the fields within the fields that are returned in the order they occur within the delimited file.quoteCharacter(char quoteCharacter) Define the character used to quote fields.strict(boolean strict) If true (the default) then the number of tokens in line must match the number of tokens defined (byRange, columns, etc.) inLineTokenizer.
-
Method Details
-
delimiter
Define the delimiter for the file.- Parameters:
delimiter- String used as a delimiter between fields.- Returns:
- The instance of the specification for chaining.
- See Also:
-
quoteCharacter
Define the character used to quote fields.- Parameters:
quoteCharacter- char used to define quoted fields- Returns:
- The instance of the specification for chaining.
- See Also:
-
includedFields
A list of indices of the fields within a delimited file to be included- Parameters:
fields- indices of the fields- Returns:
- The instance of the specification for chaining.
- See Also:
-
addIncludedField
Add an index to the list of fields to be included from the file- Parameters:
field- the index to be included- Returns:
- The instance of the specification for chaining.
- See Also:
-
names
Names of each of the fields within the fields that are returned in the order they occur within the delimited file. Required.- Parameters:
names- names of each field- Returns:
- The instance of the specification for chaining.
- See Also:
-
fieldSetFactory
A factory for creating the resultingFieldSet. Defaults toDefaultFieldSetFactory.- Parameters:
fieldSetFactory- Factory for creatingFieldSet- Returns:
- The instance of the specification for chaining.
- See Also:
-
strict
If true (the default) then the number of tokens in line must match the number of tokens defined (byRange, columns, etc.) inLineTokenizer. If false then lines with less tokens will be tolerated and padded with empty columns, and lines with more tokens will simply be truncated.- Parameters:
strict- the strict flag to set
-