org.apache.cassandra.io.util

## Class CompressedChunkReader

- java.lang.Object
- - org.apache.cassandra.io.util.AbstractReaderFileProxy
  - - org.apache.cassandra.io.util.CompressedChunkReader

All Implemented Interfaces:
  java.lang.AutoCloseable, ChunkReader, ReaderFileProxy, RebuffererFactory

Direct Known Subclasses:
  CompressedChunkReader.Mmap, CompressedChunkReader.Standard

    public abstract class CompressedChunkReader
    extends AbstractReaderFileProxy
    implements ChunkReader

### Nested Class Summary

Nested Classes
`static class` `CompressedChunkReader.Mmap`
`static class` `CompressedChunkReader.Standard`

### Field Summary

### Fields inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy

`channel, fileLength`

### Constructor Summary

Constructors
`protected` `CompressedChunkReader(ChannelProxy channel, CompressionMetadata metadata)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `chunkSize()` Buffer size required for this rebufferer.
`double` `getCrcCheckChance()` Needed for tests.
`Rebufferer` `instantiateRebufferer()`
`BufferType` `preferredBufferType()` Specifies type of buffer the caller should attempt to give.
`java.lang.String` `toString()`

### Methods inherited from class org.apache.cassandra.io.util.AbstractReaderFileProxy

`channel, close, fileLength`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.io.util.ChunkReader

`readChunk`

### Methods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy

`channel, close, fileLength`

### Constructor Detail

#### CompressedChunkReader

    protected CompressedChunkReader(ChannelProxy channel,
                                    CompressionMetadata metadata)

### Method Detail

#### getCrcCheckChance

    public double getCrcCheckChance()

Description copied from interface: `ReaderFileProxy`
Needed for tests. Returns the table's CRC check chance, which is only set for compressed tables.

Specified by:
  `getCrcCheckChance` in interface `ReaderFileProxy`
Overrides:
  `getCrcCheckChance` in class `AbstractReaderFileProxy`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `AbstractReaderFileProxy`

#### chunkSize

    public int chunkSize()

Description copied from interface: `ChunkReader`
Buffer size required for this rebufferer. Must be power of 2 if alignment is required.

Specified by:
  `chunkSize` in interface `ChunkReader`

#### preferredBufferType

    public BufferType preferredBufferType()

Description copied from interface: `ChunkReader`
Specifies type of buffer the caller should attempt to give. This is not guaranteed to be fulfilled.

Specified by:
  `preferredBufferType` in interface `ChunkReader`

#### instantiateRebufferer

    public Rebufferer instantiateRebufferer()

Specified by:
  `instantiateRebufferer` in interface `RebuffererFactory`