static class WindowsDirectory.WindowsIndexInput extends BufferedIndexInput
| Modifier and Type | Field and Description |
|---|---|
private long |
fd |
(package private) boolean |
isClone |
(package private) boolean |
isOpen |
private long |
length |
buffer, BUFFER_SIZE, MERGE_BUFFER_SIZE, MIN_BUFFER_SIZE| Constructor and Description |
|---|
WindowsIndexInput(java.nio.file.Path file,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
WindowsDirectory.WindowsIndexInput |
clone()
Returns a clone of this stream.
|
void |
close()
Closes the stream to further operations.
|
long |
length()
The number of bytes in the file.
|
protected void |
readInternal(byte[] b,
int offset,
int length)
Expert: implements buffer refill.
|
protected void |
seekInternal(long pos)
Expert: implements seek.
|
bufferSize, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readByte, readBytes, readBytes, readInt, readInt, readLong, readLong, readShort, readShort, readVInt, readVLong, seek, setBufferSize, slice, wrapgetFullSliceDescription, randomAccessSlice, toStringreadMapOfStrings, readSetOfStrings, readString, readZInt, readZLong, skipBytesprivate final long fd
private final long length
boolean isClone
boolean isOpen
public WindowsIndexInput(java.nio.file.Path file,
int bufferSize)
throws java.io.IOException
java.io.IOExceptionprotected void readInternal(byte[] b,
int offset,
int length)
throws java.io.IOException
BufferedIndexInputreadInternal in class BufferedIndexInputb - the array to read bytes intooffset - the offset in the array to start storing byteslength - the number of bytes to readjava.io.IOExceptionprotected void seekInternal(long pos)
throws java.io.IOException
BufferedIndexInputBufferedIndexInput.readInternal(byte[],int,int) will occur.seekInternal in class BufferedIndexInputjava.io.IOExceptionBufferedIndexInput.readInternal(byte[],int,int)public void close()
throws java.io.IOException
IndexInputclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class IndexInputjava.io.IOExceptionpublic long length()
IndexInputlength in class IndexInputpublic WindowsDirectory.WindowsIndexInput 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 call IndexInput.close() on the original object.
If you access the cloned IndexInput after closing the original object,
any readXXX methods will throw AlreadyClosedException.
This method is NOT thread safe, so if the current IndexInput
is being used by one thread while clone is called by another,
disaster could strike.
clone in class BufferedIndexInput