org.jrobin.core
public class RrdFileBackend extends RrdBackend
This backend is based on the RandomAccessFile class (java.io.* package).
Field Summary | |
---|---|
protected RandomAccessFile | file
radnom access file handle |
protected boolean | readOnly
read/write file status |
Constructor Summary | |
---|---|
protected | RrdFileBackend(String path, boolean readOnly)
Creates RrdFileBackend object for the given file path, backed by RandomAccessFile object.
|
Method Summary | |
---|---|
void | close()
Closes the underlying RRD file.
|
static String | getCanonicalPath(String path)
Returns canonical path to the file on the disk.
|
String | getCanonicalPath()
Returns canonical path to the file on the disk.
|
long | getLength()
Returns RRD file length.
|
protected void | read(long offset, byte[] b)
Reads a number of bytes from the RRD file on the disk
|
protected void | setLength(long length)
Sets length of the underlying RRD file. |
protected void | write(long offset, byte[] b)
Writes bytes to the underlying RRD file on the disk
|
Parameters: path Path to a file readOnly True, if file should be open in a read-only mode. False otherwise
Throws: IOException Thrown in case of I/O error
Throws: IOException Thrown in case of I/O error
Parameters: path File path
Returns: Canonical file path
Throws: IOException Thrown in case of I/O error
Returns: Canonical file path
Throws: IOException Thrown in case of I/O error
Returns: File length.
Throws: IOException Thrown in case of I/O error.
Parameters: offset Starting file offset b Buffer which receives bytes read from the file.
Throws: IOException Thrown in case of I/O error.
Parameters: length Length of the RRD file
Throws: IOException Thrown in case of I/O error.
Parameters: offset Starting file offset b Bytes to be written.
Throws: IOException Thrown in case of I/O error