public class RrdNioByteBufferBackend extends RrdFileBackend
file| Modifier | Constructor | Description |
|---|---|---|
protected |
RrdNioByteBufferBackend(String path,
boolean readOnly) |
Creates RrdFileBackend object for the given file path, backed by java.nio.* classes.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the underlying RRD file.
|
protected void |
read(long offset,
byte[] b) |
Reads a number of bytes from the RRD file on the disk
|
protected void |
setLength(long newLength) |
Sets length of the underlying RRD file.
|
protected void |
write(long offset,
byte[] b) |
Writes bytes to the underlying RRD file on the disk
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPath, isCachingAllowed, isInstanceCreated, isReadOnly, readAll, readDouble, readDouble, readInt, readLong, readString, writeDouble, writeDouble, writeDouble, writeInt, writeLong, writeStringgetCanonicalPath, getCanonicalPath, getLengthprotected RrdNioByteBufferBackend(String path, boolean readOnly) throws IOException, IllegalStateException
path - Path to a filereadOnly - True, if file should be open in a read-only mode. False otherwiseIOException - Thrown in case of I/O errorIllegalStateExceptionprotected void setLength(long newLength)
throws IOException
setLength in class RrdFileBackendnewLength - Length of the RRD fileIOException - Thrown in case of I/O error.protected void write(long offset,
byte[] b)
write in class RrdFileBackendoffset - Starting file offsetb - Bytes to be written.protected void read(long offset,
byte[] b)
read in class RrdFileBackendoffset - Starting file offsetb - Buffer which receives bytes read from the file.public void close()
throws IOException
close in class RrdFileBackendIOException - Thrown in case of I/O error