Class EncryptedFileSegmentInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.cassandra.io.util.DataInputPlus.DataInputStreamPlus
-
- 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 Modifier and Type Class Description 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 Description EncryptedFileSegmentInputStream(java.lang.String filePath, long segmentOffset, int position, int expectedLength, EncryptedFileSegmentInputStream.ChunkProvider chunkProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, close
-
Methods inherited from class org.apache.cassandra.io.util.RebufferingInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readFully, readInt, readLine, readLong, readPrimitiveSlowly, readShort, readUnsignedByte, readUnsignedShort, readUnsignedVInt, readUnsignedVInt32, readUTF, readVInt, readVInt32, skipBytes
-
Methods inherited from class java.io.InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 org.apache.cassandra.io.util.DataInputPlus
readUnsignedVInt, readUnsignedVInt32, readVInt, readVInt32, skipBytes, skipBytesFully
-
Methods inherited from interface org.apache.cassandra.io.util.FileDataInput
getPath
-
Methods inherited from interface org.apache.cassandra.io.util.RewindableDataInput
mark, reset
-
-
-
-
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 interfaceFileDataInput
- Overrides:
getFilePointer
in classFileSegmentInputStream
-
isEOF
public boolean isEOF()
- Specified by:
isEOF
in interfaceFileDataInput
- Overrides:
isEOF
in classFileSegmentInputStream
-
bytesRemaining
public long bytesRemaining()
- Specified by:
bytesRemaining
in interfaceFileDataInput
- Overrides:
bytesRemaining
in classFileSegmentInputStream
-
seek
public void seek(long position)
- Specified by:
seek
in interfaceFileDataInput
- Overrides:
seek
in classFileSegmentInputStream
-
bytesPastMark
public long bytesPastMark(DataPosition mark)
- Specified by:
bytesPastMark
in interfaceRewindableDataInput
- Overrides:
bytesPastMark
in classFileSegmentInputStream
-
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 classDataInputBuffer
-
-