类 FlatFileItemReaderBuilder.DelimitedBuilder<T>
- java.lang.Object
- org.springframework.batch.item.file.builder.FlatFileItemReaderBuilder.DelimitedBuilder<T>
- 类型参数:
T- the type of the parentFlatFileItemReaderBuilder
public static class FlatFileItemReaderBuilder.DelimitedBuilder<T> extends java.lang.Object
A builder for constructing aDelimitedLineTokenizer
构造器概要
构造器 限定符 构造器 说明 protectedDelimitedBuilder(FlatFileItemReaderBuilder<T> parent)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 FlatFileItemReaderBuilder.DelimitedBuilder<T>addIncludedField(int field)Add an index to the list of fields to be included from the fileDelimitedLineTokenizerbuild()Returns aDelimitedLineTokenizerFlatFileItemReaderBuilder.DelimitedBuilder<T>delimiter(java.lang.String delimiter)Define the delimiter for the file.FlatFileItemReaderBuilder.DelimitedBuilder<T>fieldSetFactory(FieldSetFactory fieldSetFactory)A factory for creating the resultingFieldSet.FlatFileItemReaderBuilder.DelimitedBuilder<T>includedFields(java.lang.Integer[] fields)A list of indices of the fields within a delimited file to be includedFlatFileItemReaderBuilder<T>names(java.lang.String[] names)Names of each of the fields within the fields that are returned in the order they occur within the delimited file.FlatFileItemReaderBuilder.DelimitedBuilder<T>quoteCharacter(char quoteCharacter)Define the character used to quote fields.
构造器详细资料
DelimitedBuilder
protected DelimitedBuilder(FlatFileItemReaderBuilder<T> parent)
方法详细资料
delimiter
public FlatFileItemReaderBuilder.DelimitedBuilder<T> delimiter(java.lang.String delimiter)
Define the delimiter for the file.- 参数:
delimiter- String used as a delimiter between fields.- 返回:
- The instance of the builder for chaining.
- 另请参阅:
DelimitedLineTokenizer.setDelimiter(String)
quoteCharacter
public FlatFileItemReaderBuilder.DelimitedBuilder<T> quoteCharacter(char quoteCharacter)
Define the character used to quote fields.- 参数:
quoteCharacter- char used to define quoted fields- 返回:
- The instance of the builder for chaining.
- 另请参阅:
DelimitedLineTokenizer.setQuoteCharacter(char)
includedFields
public FlatFileItemReaderBuilder.DelimitedBuilder<T> includedFields(java.lang.Integer[] fields)
A list of indices of the fields within a delimited file to be included- 参数:
fields- indices of the fields- 返回:
- The instance of the builder for chaining.
- 另请参阅:
DelimitedLineTokenizer.setIncludedFields(int[])
addIncludedField
public FlatFileItemReaderBuilder.DelimitedBuilder<T> addIncludedField(int field)
Add an index to the list of fields to be included from the file- 参数:
field- the index to be included- 返回:
- The instance of the builder for chaining.
- 另请参阅:
DelimitedLineTokenizer.setIncludedFields(int[])
fieldSetFactory
public FlatFileItemReaderBuilder.DelimitedBuilder<T> fieldSetFactory(FieldSetFactory fieldSetFactory)
A factory for creating the resultingFieldSet. Defaults toDefaultFieldSetFactory.- 参数:
fieldSetFactory- Factory for creatingFieldSet- 返回:
- The instance of the builder for chaining.
- 另请参阅:
AbstractLineTokenizer.setFieldSetFactory(FieldSetFactory)
names
public FlatFileItemReaderBuilder<T> names(java.lang.String[] names)
Names of each of the fields within the fields that are returned in the order they occur within the delimited file. Required.- 参数:
names- names of each field- 返回:
- The parent
FlatFileItemReaderBuilder - 另请参阅:
AbstractLineTokenizer.setNames(String[])
build
public DelimitedLineTokenizer build()
Returns aDelimitedLineTokenizer