org.springframework.batch.sample.support
Class HeaderCopyCallback
java.lang.Object
org.springframework.batch.sample.support.HeaderCopyCallback
- All Implemented Interfaces:
- FlatFileHeaderCallback, LineCallbackHandler
public class HeaderCopyCallback
- extends Object
- implements LineCallbackHandler, FlatFileHeaderCallback
Designed to be registered with both FlatFileItemReader
and
FlatFileItemWriter
and copy header line from input file to output
file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeaderCopyCallback
public HeaderCopyCallback()
handleLine
public void handleLine(String line)
- Specified by:
handleLine
in interface LineCallbackHandler
writeHeader
public void writeHeader(Writer writer)
throws IOException
- Description copied from interface:
FlatFileHeaderCallback
- Write contents to a file using the supplied
Writer
. It is not
required to flush the writer inside this method.
- Specified by:
writeHeader
in interface FlatFileHeaderCallback
- Throws:
IOException
Copyright © 2009 SpringSource. All Rights Reserved.