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.Decoderto decode the file content into the actual records.A
DecoderBasedReader.Decoderis generally the reverse of aEncoder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDecoderBasedReader.Decoder.Factory<T>Factory to createDecoderBasedReader.Decoder.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the open resources.TdecodeNext()voidopen(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 IOExceptionCloses the open resources. The decoder is responsible to close the input stream.- Throws:
IOException
-
-