|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.apache.lucene.store.BufferedIndexInput
org.apache.lucene.store.FSDirectory.FSIndexInput
protected abstract static class FSDirectory.FSIndexInput
Base class for reading input from a RandomAccessFile
Field Summary | |
---|---|
protected int |
chunkSize
maximum read length on a 32bit JVM to prevent incorrect OOM, see LUCENE-1566 |
protected long |
end
end offset (start+length) |
protected RandomAccessFile |
file
the underlying RandomAccessFile |
protected long |
off
start offset: non-zero in the slice case |
Fields inherited from class org.apache.lucene.store.BufferedIndexInput |
---|
buffer, BUFFER_SIZE, MERGE_BUFFER_SIZE |
Constructor Summary | |
---|---|
protected |
FSDirectory.FSIndexInput(String resourceDesc,
File path,
IOContext context,
int chunkSize)
Create a new FSIndexInput, reading the entire file from path |
protected |
FSDirectory.FSIndexInput(String resourceDesc,
RandomAccessFile file,
long off,
long length,
int bufferSize,
int chunkSize)
Create a new FSIndexInput, representing a slice of an existing open file |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.lucene.store.BufferedIndexInput |
---|
bufferSize, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readInternal, readLong, readShort, readVInt, readVLong, seek, seekInternal, setBufferSize |
Methods inherited from class org.apache.lucene.store.IndexInput |
---|
toString |
Methods inherited from class org.apache.lucene.store.DataInput |
---|
readString, readStringSet, readStringStringMap |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final RandomAccessFile file
protected final int chunkSize
protected final long off
protected final long end
Constructor Detail |
---|
protected FSDirectory.FSIndexInput(String resourceDesc, File path, IOContext context, int chunkSize) throws IOException
path
IOException
protected FSDirectory.FSIndexInput(String resourceDesc, RandomAccessFile file, long off, long length, int bufferSize, int chunkSize)
file
Method Detail |
---|
public void close() throws IOException
IndexInput
close
in interface Closeable
close
in class IndexInput
IOException
public FSDirectory.FSIndexInput clone()
IndexInput
Clones 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
IndexInput
s, 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 BufferedIndexInput
public final long length()
IndexInput
length
in class IndexInput
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |