类 HeaderCopyCallback
- java.lang.Object
- org.springframework.batch.sample.support.HeaderCopyCallback
- 所有已实现的接口:
FlatFileHeaderCallback
,LineCallbackHandler
public class HeaderCopyCallback extends java.lang.Object implements LineCallbackHandler, FlatFileHeaderCallback
Designed to be registered with bothFlatFileItemReader
andFlatFileItemWriter
and copy header line from input file to output file.
构造器概要
构造器 构造器 说明 HeaderCopyCallback()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
handleLine(java.lang.String line)
void
writeHeader(java.io.Writer writer)
Write contents to a file using the suppliedWriter
.
构造器详细资料
HeaderCopyCallback
public HeaderCopyCallback()
方法详细资料
handleLine
public void handleLine(java.lang.String line)
- 指定者:
handleLine
在接口中LineCallbackHandler
writeHeader
public void writeHeader(java.io.Writer writer) throws java.io.IOException
从接口复制的说明:FlatFileHeaderCallback
Write contents to a file using the suppliedWriter
. It is not required to flush the writer inside this method.- 指定者:
writeHeader
在接口中FlatFileHeaderCallback
- 参数:
writer
- theWriter
to be used to write the header.- 抛出:
java.io.IOException
- if error occurs during writing.