org.apache.cassandra.db.commitlog

## Class EncryptedFileSegmentInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.cassandra.io.util.RebufferingInputStream
    - - org.apache.cassandra.io.util.DataInputBuffer
      - - org.apache.cassandra.io.util.FileSegmentInputStream
        - - org.apache.cassandra.db.commitlog.EncryptedFileSegmentInputStream

All Implemented Interfaces:
  java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, DataInputPlus, FileDataInput, RewindableDataInput

    public class EncryptedFileSegmentInputStream
    extends FileSegmentInputStream
    implements FileDataInput, java.io.DataInput

Each segment of an encrypted file may contain many encrypted chunks, and each chunk needs to be individually decrypted to reconstruct the full segment.

### Nested Class Summary

Nested Classes
`static interface` `EncryptedFileSegmentInputStream.ChunkProvider`

### Nested classes/interfaces inherited from interface org.apache.cassandra.io.util.DataInputPlus

`DataInputPlus.DataInputStreamPlus`

### Field Summary

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

`buffer`

### Constructor Summary

Constructors
Constructor and Description
`EncryptedFileSegmentInputStream(java.lang.String filePath, long segmentOffset, int position, int expectedLength, EncryptedFileSegmentInputStream.ChunkProvider chunkProvider)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `bytesPastMark(DataPosition mark)`
`long` `bytesRemaining()`
`long` `getFilePointer()`
`boolean` `isEOF()`
`void` `reBuffer()` Implementations must implement this method to refill the buffer.
`void` `seek(long position)`

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

`getPath, mark, markSupported, reset`

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

`available`

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

`read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readPrimitiveSlowly, readShort, readUnsignedByte, readUnsignedShort, readUnsignedVInt, readUTF, readVInt, skipBytes`

### Methods inherited from class java.io.InputStream

`close, mark, read, reset, skip`

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

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

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

`getPath`

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

`mark, reset`

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

`readUnsignedVInt, readVInt, skipBytes, skipBytesFully`

### Methods inherited from interface java.io.DataInput

`readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF`

### Methods inherited from interface java.io.Closeable

`close`

### Constructor Detail

#### EncryptedFileSegmentInputStream

    public EncryptedFileSegmentInputStream(java.lang.String filePath,
                                           long segmentOffset,
                                           int position,
                                           int expectedLength,
                                           EncryptedFileSegmentInputStream.ChunkProvider chunkProvider)

### Method Detail

#### getFilePointer

    public long getFilePointer()

Specified by:
  `getFilePointer` in interface `FileDataInput`
Overrides:
  `getFilePointer` in class `FileSegmentInputStream`

#### isEOF

    public boolean isEOF()

Specified by:
  `isEOF` in interface `FileDataInput`
Overrides:
  `isEOF` in class `FileSegmentInputStream`

#### bytesRemaining

    public long bytesRemaining()

Specified by:
  `bytesRemaining` in interface `FileDataInput`
Overrides:
  `bytesRemaining` in class `FileSegmentInputStream`

#### seek

    public void seek(long position)

Specified by:
  `seek` in interface `FileDataInput`
Overrides:
  `seek` in class `FileSegmentInputStream`

#### bytesPastMark

    public long bytesPastMark(DataPosition mark)

Specified by:
  `bytesPastMark` in interface `RewindableDataInput`
Overrides:
  `bytesPastMark` in class `FileSegmentInputStream`

#### reBuffer

    public void reBuffer()

Description copied from class: `RebufferingInputStream`
Implementations must implement this method to refill the buffer. They can expect the buffer to be empty when this method is invoked.

Overrides:
  `reBuffer` in class `DataInputBuffer`