Package org.apache.lucene.store
Class NIOFSDirectory.NIOFSIndexInput
java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.apache.lucene.store.BufferedIndexInput
org.apache.lucene.store.FSDirectory.FSIndexInput
org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
- Enclosing class:
- NIOFSDirectory
Reads bytes with
FileChannel.read(ByteBuffer, long)-
Field Summary
Fields inherited from class org.apache.lucene.store.FSDirectory.FSIndexInput
end, file, offFields inherited from class org.apache.lucene.store.BufferedIndexInput
buffer, BUFFER_SIZE, MERGE_BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNIOFSIndexInput(File path, IOContext context) NIOFSIndexInput(String sliceDescription, File path, RandomAccessFile file, FileChannel fc, long off, long length, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidnewBuffer(byte[] newBuffer) protected voidreadInternal(byte[] b, int offset, int len) Expert: implements buffer refill.protected voidseekInternal(long pos) Expert: implements seek.Methods inherited from class org.apache.lucene.store.FSDirectory.FSIndexInput
clone, close, lengthMethods inherited from class org.apache.lucene.store.BufferedIndexInput
bufferSize, flushBuffer, getBufferSize, getFilePointer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSizeMethods inherited from class org.apache.lucene.store.IndexInput
toStringMethods inherited from class org.apache.lucene.store.DataInput
readString, readStringSet, readStringStringMap
-
Constructor Details
-
NIOFSIndexInput
- Throws:
IOException
-
NIOFSIndexInput
public NIOFSIndexInput(String sliceDescription, File path, RandomAccessFile file, FileChannel fc, long off, long length, int bufferSize)
-
-
Method Details
-
newBuffer
protected void newBuffer(byte[] newBuffer) - Overrides:
newBufferin classBufferedIndexInput
-
readInternal
Description copied from class:BufferedIndexInputExpert: implements buffer refill. Reads bytes from the current position in the input.- Specified by:
readInternalin classBufferedIndexInput- Parameters:
b- the array to read bytes intooffset- the offset in the array to start storing byteslen- the number of bytes to read- Throws:
IOException
-
seekInternal
Description copied from class:BufferedIndexInputExpert: implements seek. Sets current position in this file, where the nextBufferedIndexInput.readInternal(byte[],int,int)will occur.- Specified by:
seekInternalin classBufferedIndexInput- Throws:
IOException- See Also:
-