Package org.apache.lucene.store
Class RAMFile
java.lang.Object
org.apache.lucene.store.RAMFile
Represents a file in RAM as a list of byte[] buffers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
buffers
-
sizeInBytes
protected long sizeInBytes
-
-
Constructor Details
-
RAMFile
public RAMFile()
-
-
Method Details
-
getLength
public long getLength() -
setLength
protected void setLength(long length) -
addBuffer
protected final byte[] addBuffer(int size) -
getBuffer
protected final byte[] getBuffer(int index) -
numBuffers
protected final int numBuffers() -
newBuffer
protected byte[] newBuffer(int size) Expert: allocate a new buffer. Subclasses can allocate differently.- Parameters:
size
- size of allocated buffer.- Returns:
- allocated buffer.
-
getSizeInBytes
public long getSizeInBytes()
-