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 long
bytesPastMark(DataPosition mark)
long
bytesRemaining()
long
getFilePointer()
java.lang.String
getPath()
boolean
isEOF()
DataPosition
mark()
boolean
markSupported()
void
reset(DataPosition mark)
void
seek(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:
getPath
in interfaceFileDataInput
-
isEOF
public boolean isEOF()
- Specified by:
isEOF
in interfaceFileDataInput
-
bytesRemaining
public long bytesRemaining()
- Specified by:
bytesRemaining
in interfaceFileDataInput
-
seek
public void seek(long pos)
- Specified by:
seek
in interfaceFileDataInput
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
mark
public DataPosition mark()
- Specified by:
mark
in interfaceRewindableDataInput
-
reset
public void reset(DataPosition mark)
- Specified by:
reset
in interfaceRewindableDataInput
-
bytesPastMark
public long bytesPastMark(DataPosition mark)
- Specified by:
bytesPastMark
in interfaceRewindableDataInput
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in interfaceFileDataInput
-
-