Class SimpleStringDecoder
- java.lang.Object
-
- org.apache.flink.connector.file.sink.compactor.SimpleStringDecoder
-
- All Implemented Interfaces:
Serializable,DecoderBasedReader.Decoder<String>
@PublicEvolving public class SimpleStringDecoder extends Object implements DecoderBasedReader.Decoder<String>
A sinkDecoderBasedReader.Decoderthat reads data encoded by theSimpleStringEncoderonly for compaction. The original input type is missing, but it's enough to read string contents for writing the compacted file.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.connector.file.sink.compactor.DecoderBasedReader.Decoder
DecoderBasedReader.Decoder.Factory<T>
-
-
Constructor Summary
Constructors Constructor Description SimpleStringDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the open resources.StringdecodeNext()voidopen(InputStream input)Prepares to start decoding the input stream.
-
-
-
Method Detail
-
open
public void open(InputStream input) throws IOException
Description copied from interface:DecoderBasedReader.DecoderPrepares to start decoding the input stream.- Specified by:
openin interfaceDecoderBasedReader.Decoder<String>- Throws:
IOException
-
decodeNext
public String decodeNext() throws IOException
- Specified by:
decodeNextin interfaceDecoderBasedReader.Decoder<String>- Returns:
- The next record that decoded from the opened input stream, or null if no more available.
- Throws:
IOException
-
close
public void close() throws IOExceptionDescription copied from interface:DecoderBasedReader.DecoderCloses the open resources. The decoder is responsible to close the input stream.- Specified by:
closein interfaceDecoderBasedReader.Decoder<String>- Throws:
IOException
-
-