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.Decoder
that reads data encoded by theSimpleStringEncoder
only 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 void
close()
Closes the open resources.String
decodeNext()
void
open(InputStream input)
Prepares to start decoding the input stream.
-
-
-
Method Detail
-
open
public void open(InputStream input) throws IOException
Description copied from interface:DecoderBasedReader.Decoder
Prepares to start decoding the input stream.- Specified by:
open
in interfaceDecoderBasedReader.Decoder<String>
- Throws:
IOException
-
decodeNext
public String decodeNext() throws IOException
- Specified by:
decodeNext
in 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 IOException
Description copied from interface:DecoderBasedReader.Decoder
Closes the open resources. The decoder is responsible to close the input stream.- Specified by:
close
in interfaceDecoderBasedReader.Decoder<String>
- Throws:
IOException
-
-