public class RAMFile extends Object implements Accountable
Modifier and Type | Field and Description |
---|---|
protected ArrayList<byte[]> |
buffers |
protected long |
sizeInBytes |
Constructor and Description |
---|
RAMFile() |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
addBuffer(int size) |
boolean |
equals(Object obj) |
protected byte[] |
getBuffer(int index) |
long |
getLength() |
int |
hashCode() |
protected byte[] |
newBuffer(int size)
Expert: allocate a new buffer.
|
protected int |
numBuffers() |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
protected void |
setLength(long length) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildResources
protected final ArrayList<byte[]> buffers
protected long sizeInBytes
public long getLength()
protected void setLength(long length)
protected final byte[] addBuffer(int size)
protected final byte[] getBuffer(int index)
protected final int numBuffers()
protected byte[] newBuffer(int size)
size
- size of allocated buffer.public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.