gate.creole.annic.apache.lucene.store
Class RAMInputStream
java.lang.Object
gate.creole.annic.apache.lucene.store.InputStream
gate.creole.annic.apache.lucene.store.RAMInputStream
- All Implemented Interfaces:
- Cloneable
class RAMInputStream
- extends InputStream
- implements Cloneable
A memory-resident InputStream implementation.
- Version:
- $Id: RAMInputStream.java 529 2004-10-05 11:55:26Z niraj $
|
Method Summary |
void |
close()
Closes the stream to futher operations. |
void |
readInternal(byte[] dest,
int destOffset,
int len)
Expert: implements buffer refill. |
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 |
file
private RAMFile file
pointer
private int pointer
RAMInputStream
public RAMInputStream(RAMFile f)
readInternal
public void readInternal(byte[] dest,
int destOffset,
int len)
- Description copied from class:
InputStream
- Expert: implements buffer refill. Reads bytes from the current position
in the input.
- Specified by:
readInternal in class InputStream
- Parameters:
dest - the array to read bytes intodestOffset - the offset in the array to start storing byteslen - the number of bytes to read
close
public void close()
- Description copied from class:
InputStream
- Closes the stream to futher operations.
- Specified by:
close in class InputStream
seekInternal
public void seekInternal(long pos)
- Description copied from class:
InputStream
- Expert: implements seek. Sets current position in this file, where the
next
InputStream.readInternal(byte[],int,int) will occur.
- Specified by:
seekInternal in class InputStream
- See Also:
InputStream.readInternal(byte[],int,int)