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, wait
getPath, isCachingAllowed, isInstanceCreated, isReadOnly, readAll, readDouble, readDouble, readInt, readLong, readString, writeDouble, writeDouble, writeDouble, writeInt, writeLong, writeString
getCanonicalPath, getCanonicalPath, getLength
protected 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 errorIllegalStateException
protected void setLength(long newLength) throws IOException
setLength
in class RrdFileBackend
newLength
- Length of the RRD fileIOException
- Thrown in case of I/O error.protected void write(long offset, byte[] b)
write
in class RrdFileBackend
offset
- Starting file offsetb
- Bytes to be written.protected void read(long offset, byte[] b)
read
in class RrdFileBackend
offset
- Starting file offsetb
- Buffer which receives bytes read from the file.public void close() throws IOException
close
in class RrdFileBackend
IOException
- Thrown in case of I/O error