public class CompressedInputStream extends RebufferingInputStream implements java.lang.AutoCloseable
CompressionInfo
. Uses RebufferingInputStream.buffer
as a buffer
for uncompressed data (which is read by stream consumers - CassandraStreamReader.StreamDeserializer
in this case).DataInputPlus.DataInputStreamPlus
buffer
Constructor and Description |
---|
CompressedInputStream(DataInputPlus source,
CompressionInfo info,
ChecksumType checksumType,
java.util.function.DoubleSupplier crcCheckChanceSupplier) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the resources specific to this instance, but not the
DataInputPlus that is used by the Reader . |
long |
getTotalCompressedBytesRead() |
void |
position(long position)
Invoked when crossing into the next stream boundary in
CassandraStreamReader.sections . |
protected void |
reBuffer()
Implementations must implement this method to refill the buffer.
|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readPrimitiveSlowly, readShort, readUnsignedByte, readUnsignedShort, readUnsignedVInt, readUTF, readVInt, skipBytes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
skipBytesFully
public CompressedInputStream(DataInputPlus source, CompressionInfo info, ChecksumType checksumType, java.util.function.DoubleSupplier crcCheckChanceSupplier)
source
- Input source to read compressed data frominfo
- Compression infopublic void position(long position) throws java.io.IOException
CassandraStreamReader.sections
.java.io.IOException
protected void reBuffer() throws java.io.IOException
RebufferingInputStream
reBuffer
in class RebufferingInputStream
java.io.IOException
public long getTotalCompressedBytesRead()
public void close()
DataInputPlus
that is used by the Reader
.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
Copyright © 2009-2019 The Apache Software Foundation