Package org.apache.cassandra.io.util
Class FileInputStreamPlus
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.cassandra.io.util.DataInputPlus.DataInputStreamPlus
-
- org.apache.cassandra.io.util.RebufferingInputStream
-
- org.apache.cassandra.io.util.FileInputStreamPlus
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.lang.AutoCloseable
,DataInputPlus
public class FileInputStreamPlus extends RebufferingInputStream
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.io.util.DataInputPlus
DataInputPlus.DataInputStreamPlus
-
-
Field Summary
Fields Modifier and Type Field Description File
file
-
Fields inherited from class org.apache.cassandra.io.util.RebufferingInputStream
buffer
-
-
Constructor Summary
Constructors Constructor Description FileInputStreamPlus(java.lang.String file)
FileInputStreamPlus(java.nio.file.Path path)
FileInputStreamPlus(File file)
FileInputStreamPlus(File file, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.nio.channels.FileChannel
getChannel()
protected void
reBuffer()
Implementations must implement this method to refill the buffer.-
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
available, mark, markSupported, 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 org.apache.cassandra.io.util.DataInputPlus
skipBytesFully
-
-
-
-
Field Detail
-
file
public final File file
-
-
Constructor Detail
-
FileInputStreamPlus
public FileInputStreamPlus(java.lang.String file) throws java.nio.file.NoSuchFileException
- Throws:
java.nio.file.NoSuchFileException
-
FileInputStreamPlus
public FileInputStreamPlus(java.nio.file.Path path) throws java.nio.file.NoSuchFileException
- Throws:
java.nio.file.NoSuchFileException
-
FileInputStreamPlus
public FileInputStreamPlus(File file) throws java.nio.file.NoSuchFileException
- Throws:
java.nio.file.NoSuchFileException
-
FileInputStreamPlus
public FileInputStreamPlus(File file, int bufferSize) throws java.nio.file.NoSuchFileException
- Throws:
java.nio.file.NoSuchFileException
-
-
Method Detail
-
reBuffer
protected void reBuffer() throws java.io.IOException
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.- Specified by:
reBuffer
in classRebufferingInputStream
- Throws:
java.io.IOException
-
getChannel
public java.nio.channels.FileChannel getChannel()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-