public abstract class RrdByteArrayBackend extends ByteBufferBackend
BYTEORDER| Modifier | Constructor and Description |
|---|---|
protected | RrdByteArrayBackend(String path)Path to the RRD file. |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] | getBuffer()Underlying byte buffer. |
long | getLength()Returns the number of RRD bytes in the underlying storage. |
protected void | read(long offset,
byte[] bytes)Read bytes from the in-memory buffer at the given offset. |
protected void | setBuffer(byte[] buffer)Byte array to wrap as backend storage. |
protected void | setLength(long length)Sets the number of bytes in the underlying RRD storage. |
close, getCharBuffer, isDirty, readDouble, readDouble, readInt, readLong, readShort, rrdClose, setByteBuffer, write, writeDouble, writeDouble, writeDouble, writeInt, writeLong, writeShort, writeStringdone, getFactory, getPath, getUri, isCachingAllowed, isInstanceCreated, readAll, readString, writeStringprotected RrdByteArrayBackend(String path)
path - path to the RRD fileprotected byte[] getBuffer()
public long getLength()
getLength in class RrdBackendprotected void read(long offset,
byte[] bytes)
throws IOExceptionread in class ByteBufferBackendoffset - starting position in the bufferbytes - array to receive the dataIOException - if the read failsIllegalArgumentException - if offset exceeds buffer lengthprotected void setBuffer(byte[] buffer)
buffer - byte array to wrap as backend storageprotected void setLength(long length)
It will reserves a memory section as a RRD storage.
setLength in class RrdBackendlength - Length of the underlying RRD storage in bytes.