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:
Closeable,DataInput,AutoCloseable,DataInputPlus,FileDataInput,RewindableDataInput
public class EncryptedFileSegmentInputStream
extends FileSegmentInputStream
implements FileDataInput, 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 ClassesNested 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
ConstructorsConstructorDescriptionEncryptedFileSegmentInputStream(String filePath, long segmentOffset, int position, int expectedLength, EncryptedFileSegmentInputStream.ChunkProvider chunkProvider) -
Method Summary
Modifier and TypeMethodDescriptionlongbytesPastMark(DataPosition mark) longlongbooleanisEOF()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, resetMethods inherited from class org.apache.cassandra.io.util.DataInputBuffer
available, closeMethods 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, skipBytesMethods inherited from class java.io.InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTFMethods inherited from interface org.apache.cassandra.io.util.DataInputPlus
readUnsignedVInt, readUnsignedVInt32, readVInt, readVInt32, skipBytes, skipBytesFullyMethods inherited from interface org.apache.cassandra.io.util.FileDataInput
getPathMethods inherited from interface org.apache.cassandra.io.util.RewindableDataInput
mark, reset
-
Constructor Details
-
EncryptedFileSegmentInputStream
public EncryptedFileSegmentInputStream(String filePath, long segmentOffset, int position, int expectedLength, EncryptedFileSegmentInputStream.ChunkProvider chunkProvider)
-
-
Method Details
-
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
- 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
-