MMapDirectory. It will be removed in future versions
of Lucene.@Deprecated public class RAMInputStream extends IndexInput implements java.lang.Cloneable
IndexInput implementation.| Modifier and Type | Field and Description |
|---|---|
private int |
bufferLength
Deprecated.
|
private int |
bufferPosition
Deprecated.
|
private byte[] |
currentBuffer
Deprecated.
|
private int |
currentBufferIndex
Deprecated.
|
private RAMFile |
file
Deprecated.
|
private long |
length
Deprecated.
|
| Constructor and Description |
|---|
RAMInputStream(java.lang.String name,
RAMFile f)
Deprecated.
|
RAMInputStream(java.lang.String name,
RAMFile f,
long length)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
Closes the stream to further operations.
|
long |
getFilePointer()
Deprecated.
Returns the current position in this file, where the next read will
occur.
|
long |
length()
Deprecated.
The number of bytes in the file.
|
private void |
nextBuffer()
Deprecated.
|
byte |
readByte()
Deprecated.
Reads and returns a single byte.
|
void |
readBytes(byte[] b,
int offset,
int len)
Deprecated.
Reads a specified number of bytes into an array at the specified offset.
|
void |
seek(long pos)
Deprecated.
Sets current position in this file, where the next read will occur.
|
private void |
setCurrentBuffer()
Deprecated.
|
IndexInput |
slice(java.lang.String sliceDescription,
long offset,
long sliceLength)
Deprecated.
Creates a slice of this index input, with the given description, offset, and length.
|
clone, getFullSliceDescription, randomAccessSlice, toStringreadBytes, readInt, readLELongs, readLong, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong, skipBytesprivate final RAMFile file
private final long length
private byte[] currentBuffer
private int currentBufferIndex
private int bufferPosition
private int bufferLength
public RAMInputStream(java.lang.String name,
RAMFile f)
throws java.io.IOException
java.io.IOExceptionRAMInputStream(java.lang.String name,
RAMFile f,
long length)
throws java.io.IOException
java.io.IOExceptionpublic void close()
IndexInputclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class IndexInputpublic long length()
IndexInputlength in class IndexInputpublic byte readByte()
throws java.io.IOException
DataInputreadByte in class DataInputjava.io.IOExceptionDataOutput.writeByte(byte)public void readBytes(byte[] b,
int offset,
int len)
throws java.io.IOException
DataInputreadBytes in class DataInputb - the array to read bytes intooffset - the offset in the array to start storing byteslen - the number of bytes to readjava.io.IOExceptionDataOutput.writeBytes(byte[],int)public long getFilePointer()
IndexInputgetFilePointer in class IndexInputIndexInput.seek(long)public void seek(long pos)
throws java.io.IOException
IndexInputEOFException and then the
stream is in an undetermined state.seek in class IndexInputjava.io.IOExceptionIndexInput.getFilePointer()private void nextBuffer()
throws java.io.IOException
java.io.IOExceptionprivate final void setCurrentBuffer()
throws java.io.IOException
java.io.IOExceptionpublic IndexInput slice(java.lang.String sliceDescription, long offset, long sliceLength) throws java.io.IOException
IndexInputslice in class IndexInputjava.io.IOException