org.apache.lucene.store
protected abstract static class FSDirectory.FSIndexInput extends BufferedIndexInput
| Modifier and Type | Field and Description |
|---|---|
protected long |
end
end offset (start+length)
|
protected RandomAccessFile |
file
the underlying RandomAccessFile
|
protected long |
off
start offset: non-zero in the slice case
|
buffer, BUFFER_SIZE, MERGE_BUFFER_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
FSDirectory.FSIndexInput(String resourceDesc,
File path,
IOContext context)
Create a new FSIndexInput, reading the entire file from
path |
protected |
FSDirectory.FSIndexInput(String resourceDesc,
RandomAccessFile file,
long off,
long length,
int bufferSize)
Create a new FSIndexInput, representing a slice of an existing open
file |
| Modifier and Type | Method and Description |
|---|---|
FSDirectory.FSIndexInput |
clone()
Returns a clone of this stream.
|
void |
close()
Closes the stream to further operations.
|
long |
length()
The number of bytes in the file.
|
bufferSize, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readInternal, readLong, readShort, readVInt, readVLong, seek, seekInternal, setBufferSizetoStringreadString, readStringSet, readStringStringMapprotected final RandomAccessFile file
protected final long off
protected final long end
protected FSDirectory.FSIndexInput(String resourceDesc, File path, IOContext context) throws IOException
pathIOExceptionprotected FSDirectory.FSIndexInput(String resourceDesc, RandomAccessFile file, long off, long length, int bufferSize)
filepublic void close()
throws IOException
IndexInputclose in interface Closeableclose in class IndexInputIOExceptionpublic FSDirectory.FSIndexInput clone()
IndexInputClones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.
Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.
Warning: Lucene never closes cloned
IndexInputs, it will only do this on the original one.
The original instance must take care that cloned instances throw
AlreadyClosedException when the original one is closed.
clone in class BufferedIndexInputpublic final long length()
IndexInputlength in class IndexInputCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.