Interface DecoderBasedReader.Decoder<T>

Type Parameters:
T - Thy type of the records the reader is reading.
All Superinterfaces:
Serializable
All Known Implementing Classes:
SimpleStringDecoder
Enclosing class:
DecoderBasedReader<T>

public static interface DecoderBasedReader.Decoder<T> extends Serializable
A DecoderBasedReader.Decoder to decode the file content into the actual records.

A DecoderBasedReader.Decoder is generally the reverse of a Encoder.

  • Method Details

    • open

      void open(InputStream input) throws IOException
      Prepares to start decoding the input stream.
      Throws:
      IOException
    • decodeNext

      T decodeNext() throws IOException
      Returns:
      The next record that decoded from the opened input stream, or null if no more available.
      Throws:
      IOException
    • close

      void close() throws IOException
      Closes the open resources. The decoder is responsible to close the input stream.
      Throws:
      IOException