gate.creole.annic.apache.lucene.index
Class CompoundFileReader.CSInputStream
java.lang.Object
gate.creole.annic.apache.lucene.store.InputStream
gate.creole.annic.apache.lucene.index.CompoundFileReader.CSInputStream
- All Implemented Interfaces:
- Cloneable
- Enclosing class:
- CompoundFileReader
static final class CompoundFileReader.CSInputStream
- extends InputStream
Implementation of an InputStream that reads from a portion of the
compound file. The visibility is left as "package" *only* because
this helps with testing since JUnit test cases in a different class
can then access package fields of this class.
|
Method Summary |
void |
close()
Closes the stream to futher operations. |
protected void |
readInternal(byte[] b,
int offset,
int len)
Expert: implements buffer refill. |
protected void |
seekInternal(long pos)
Expert: implements seek. |
| Methods inherited from class gate.creole.annic.apache.lucene.store.InputStream |
clone, getFilePointer, length, readByte, readBytes, readChars, readInt, readLong, readString, readVInt, readVLong, seek |
base
InputStream base
fileOffset
long fileOffset
CompoundFileReader.CSInputStream
CompoundFileReader.CSInputStream(InputStream base,
long fileOffset,
long length)
throws IOException
- Throws:
IOException
readInternal
protected void readInternal(byte[] b,
int offset,
int len)
throws IOException
- Expert: implements buffer refill. Reads bytes from the current
position in the input.
- Specified by:
readInternal in class InputStream
- Parameters:
b - the array to read bytes intooffset - the offset in the array to start storing byteslength - the number of bytes to read
- Throws:
IOException
seekInternal
protected void seekInternal(long pos)
throws IOException
- Expert: implements seek. Sets current position in this file, where
the next
readInternal(byte[],int,int) will occur.
- Specified by:
seekInternal in class InputStream
- Throws:
IOException- See Also:
readInternal(byte[],int,int)
close
public void close()
throws IOException
- Closes the stream to futher operations.
- Specified by:
close in class InputStream
- Throws:
IOException