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 java.lang.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

    Constructors
    Constructor and Description
    `HeaderCopyCallback()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleLine(java.lang.String line)`
    `void` | `writeHeader(java.io.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(java.lang.String line)

      Specified by:
        `handleLine` in interface `LineCallbackHandler`

    - #### writeHeader

          public void writeHeader(java.io.Writer writer)
                           throws java.io.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:
        `java.io.IOException`