Class FlatFileItemReaderBuilder.FixedLengthBuilder<T>
java.lang.Object
org.springframework.batch.infrastructure.item.file.builder.FlatFileItemReaderBuilder.FixedLengthBuilder<T>
- Type Parameters:
T- the type of the parentFlatFileItemReaderBuilder
- Enclosing class:
FlatFileItemReaderBuilder<T>
A builder for constructing a
FixedLengthTokenizer- Since:
- 4.0
- Author:
- Michael Minella, Glenn Renfro, Mahmoud Ben Hassine, Drummond Dawson, Patrick Baumgartner, François Martin, Stefano Cordio, Daeho Kwon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddColumns(Range range) Add a column range to the existing listaddColumns(Range range, int index) Insert a column range to the existing listbuild()Returns aFixedLengthTokenizerThe column ranges for each fieldfieldSetFactory(FieldSetFactory fieldSetFactory) A factory for creating the resultingFieldSet.The names of the fields to be parsed from the file.strict(boolean strict) Boolean indicating if the number of tokens in a line must match the number of fields (ranges) configured.
-
Constructor Details
-
FixedLengthBuilder
-
-
Method Details
-
columns
The column ranges for each field- Parameters:
ranges- column ranges- Returns:
- This instance for chaining
- See Also:
-
addColumns
Add a column range to the existing list- Parameters:
range- a new column range- Returns:
- This instance for chaining
- See Also:
-
addColumns
Insert a column range to the existing list- Parameters:
range- a new column rangeindex- index to add it at- Returns:
- This instance for chaining
- See Also:
-
names
The names of the fields to be parsed from the file. Required.- Parameters:
names- names of fields- Returns:
- The parent builder
- See Also:
-
strict
Boolean indicating if the number of tokens in a line must match the number of fields (ranges) configured. Defaults to true.- Parameters:
strict- defaults to true- Returns:
- This instance for chaining
- See Also:
-
fieldSetFactory
public FlatFileItemReaderBuilder.FixedLengthBuilder<T> fieldSetFactory(FieldSetFactory fieldSetFactory) A factory for creating the resultingFieldSet. Defaults toDefaultFieldSetFactory.- Parameters:
fieldSetFactory- Factory for creatingFieldSet- Returns:
- The instance of the builder for chaining.
- See Also:
-
build
-