Package io.trino.orc.stream
Class ByteOutputStream
- java.lang.Object
-
- io.trino.orc.stream.ByteOutputStream
-
- All Implemented Interfaces:
ValueOutputStream<ByteStreamCheckpoint>
public class ByteOutputStream extends Object implements ValueOutputStream<ByteStreamCheckpoint>
-
-
Constructor Summary
Constructors Constructor Description ByteOutputStream(CompressionKind compression, int bufferSize)ByteOutputStream(OrcOutputBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetBufferedBytes()This method returns the size of the flushed data plus any unflushed data.List<ByteStreamCheckpoint>getCheckpoints()longgetRetainedBytes()StreamDataOutputgetStreamDataOutput(OrcColumnId columnId)voidrecordCheckpoint()voidreset()voidwriteByte(byte value)
-
-
-
Constructor Detail
-
ByteOutputStream
public ByteOutputStream(CompressionKind compression, int bufferSize)
-
ByteOutputStream
public ByteOutputStream(OrcOutputBuffer buffer)
-
-
Method Detail
-
writeByte
public void writeByte(byte value)
-
recordCheckpoint
public void recordCheckpoint()
- Specified by:
recordCheckpointin interfaceValueOutputStream<ByteStreamCheckpoint>
-
close
public void close()
- Specified by:
closein interfaceValueOutputStream<ByteStreamCheckpoint>
-
getCheckpoints
public List<ByteStreamCheckpoint> getCheckpoints()
- Specified by:
getCheckpointsin interfaceValueOutputStream<ByteStreamCheckpoint>
-
getStreamDataOutput
public StreamDataOutput getStreamDataOutput(OrcColumnId columnId)
- Specified by:
getStreamDataOutputin interfaceValueOutputStream<ByteStreamCheckpoint>
-
getBufferedBytes
public long getBufferedBytes()
Description copied from interface:ValueOutputStreamThis method returns the size of the flushed data plus any unflushed data. If the output is compressed, flush data size is the size after compression.- Specified by:
getBufferedBytesin interfaceValueOutputStream<ByteStreamCheckpoint>
-
getRetainedBytes
public long getRetainedBytes()
- Specified by:
getRetainedBytesin interfaceValueOutputStream<ByteStreamCheckpoint>
-
reset
public void reset()
- Specified by:
resetin interfaceValueOutputStream<ByteStreamCheckpoint>
-
-