private static final class BufferedIndexInput.SlicedIndexInput extends BufferedIndexInput
Modifier and Type | Field and Description |
---|---|
(package private) IndexInput |
base |
(package private) long |
fileOffset |
(package private) long |
length |
buffer, BUFFER_SIZE, MERGE_BUFFER_SIZE, MIN_BUFFER_SIZE
Constructor and Description |
---|
SlicedIndexInput(java.lang.String sliceDescription,
IndexInput base,
long offset,
long length) |
Modifier and Type | Method and Description |
---|---|
BufferedIndexInput.SlicedIndexInput |
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 len)
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, wrap
getFullSliceDescription, randomAccessSlice, toString
readMapOfStrings, readSetOfStrings, readString, readZInt, readZLong, skipBytes
IndexInput base
long fileOffset
long length
SlicedIndexInput(java.lang.String sliceDescription, IndexInput base, long offset, long length)
public BufferedIndexInput.SlicedIndexInput 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 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
protected void readInternal(byte[] b, int offset, int len) throws java.io.IOException
BufferedIndexInput
readInternal
in class BufferedIndexInput
b
- the array to read bytes intooffset
- the offset in the array to start storing byteslen
- the number of bytes to readjava.io.IOException
protected void seekInternal(long pos)
BufferedIndexInput
BufferedIndexInput.readInternal(byte[],int,int)
will occur.seekInternal
in class BufferedIndexInput
BufferedIndexInput.readInternal(byte[],int,int)
public void close() throws java.io.IOException
IndexInput
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class IndexInput
java.io.IOException
public long length()
IndexInput
length
in class IndexInput