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 interfaceEncryptedFileSegmentInputStream.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 longbytesPastMark(DataPosition mark)longbytesRemaining()longgetFilePointer()booleanisEOF()voidreBuffer()Implementations must implement this method to refill the buffer.voidseek(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:
getFilePointerin interfaceFileDataInput- Overrides:
getFilePointerin classFileSegmentInputStream
-
isEOF
public boolean isEOF()
- Specified by:
isEOFin interfaceFileDataInput- Overrides:
isEOFin classFileSegmentInputStream
-
bytesRemaining
public long bytesRemaining()
- Specified by:
bytesRemainingin interfaceFileDataInput- Overrides:
bytesRemainingin classFileSegmentInputStream
-
seek
public void seek(long position)
- Specified by:
seekin interfaceFileDataInput- Overrides:
seekin classFileSegmentInputStream
-
bytesPastMark
public long bytesPastMark(DataPosition mark)
- Specified by:
bytesPastMarkin interfaceRewindableDataInput- Overrides:
bytesPastMarkin classFileSegmentInputStream
-
reBuffer
public void reBuffer()
Description copied from class:RebufferingInputStreamImplementations must implement this method to refill the buffer. They can expect the buffer to be empty when this method is invoked.- Overrides:
reBufferin classDataInputBuffer
-
-