Package org.apache.cassandra.io.util
Class FileSegmentInputStream
- 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
-
- All Implemented Interfaces:
java.io.Closeable,java.io.DataInput,java.lang.AutoCloseable,DataInputPlus,FileDataInput,RewindableDataInput
- Direct Known Subclasses:
EncryptedFileSegmentInputStream
public class FileSegmentInputStream extends DataInputBuffer implements FileDataInput
This is the same as DataInputBuffer, i.e. a stream for a fixed byte buffer, except that we also implement FileDataInput by using an offset and a file path.
-
-
Nested Class Summary
-
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 FileSegmentInputStream(java.nio.ByteBuffer buffer, java.lang.String filePath, long offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longbytesPastMark(DataPosition mark)longbytesRemaining()longgetFilePointer()java.lang.StringgetPath()booleanisEOF()DataPositionmark()booleanmarkSupported()voidreset(DataPosition mark)voidseek(long pos)-
Methods inherited from class org.apache.cassandra.io.util.DataInputBuffer
available, close, reBuffer
-
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
-
-
-
-
Method Detail
-
getPath
public java.lang.String getPath()
- Specified by:
getPathin interfaceFileDataInput
-
isEOF
public boolean isEOF()
- Specified by:
isEOFin interfaceFileDataInput
-
bytesRemaining
public long bytesRemaining()
- Specified by:
bytesRemainingin interfaceFileDataInput
-
seek
public void seek(long pos)
- Specified by:
seekin interfaceFileDataInput
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
mark
public DataPosition mark()
- Specified by:
markin interfaceRewindableDataInput
-
reset
public void reset(DataPosition mark)
- Specified by:
resetin interfaceRewindableDataInput
-
bytesPastMark
public long bytesPastMark(DataPosition mark)
- Specified by:
bytesPastMarkin interfaceRewindableDataInput
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointerin interfaceFileDataInput
-
-