org.springframework.batch.sample.support
Class HeaderCopyCallback

java.lang.Object
  extended by 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.


Constructor Summary
HeaderCopyCallback()
           
 
Method Summary
 void handleLine(String line)
           
 void writeHeader(Writer writer)
          Write contents to a file using the supplied Writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderCopyCallback

public HeaderCopyCallback()
Method Detail

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.