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
ADecoderBasedReader.Decoder
to decode the file content into the actual records.A
DecoderBasedReader.Decoder
is generally the reverse of aEncoder
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DecoderBasedReader.Decoder.Factory<T>
Factory to createDecoderBasedReader.Decoder
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the open resources.T
decodeNext()
void
open(InputStream input)
Prepares to start decoding the input stream.
-
-
-
Method Detail
-
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
-
-