RrdNioBackend
, RrdNioByteBufferBackend
, RrdSafeFileBackend
public class RrdFileBackend extends RrdBackend
This backend is based on the RandomAccessFile class (java.io.* package).
修飾子とタイプ | フィールド | 説明 |
---|---|---|
protected java.io.RandomAccessFile |
file |
radnom access file handle
|
修飾子 | コンストラクタ | 説明 |
---|---|---|
protected |
RrdFileBackend(java.lang.String path,
boolean readOnly) |
Creates RrdFileBackend object for the given file path, backed by RandomAccessFile object.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
close() |
Closes the underlying RRD file.
|
java.lang.String |
getCanonicalPath() |
Returns canonical path to the file on the disk.
|
static java.lang.String |
getCanonicalPath(java.lang.String path) |
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
|
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
protected RrdFileBackend(java.lang.String path, boolean readOnly) throws java.io.IOException
path
- Path to a filereadOnly
- True, if file should be open in a read-only mode. False otherwisejava.io.IOException
- Thrown in case of I/O errorpublic void close() throws java.io.IOException
close
クラス内 RrdBackend
java.io.IOException
- Thrown in case of I/O errorpublic static java.lang.String getCanonicalPath(java.lang.String path) throws java.io.IOException
path
- File pathjava.io.IOException
- Thrown in case of I/O errorpublic java.lang.String getCanonicalPath() throws java.io.IOException
java.io.IOException
- Thrown in case of I/O errorprotected void write(long offset, byte[] b) throws java.io.IOException
write
クラス内 RrdBackend
offset
- Starting file offsetb
- Bytes to be written.java.io.IOException
- Thrown in case of I/O errorprotected void read(long offset, byte[] b) throws java.io.IOException
read
クラス内 RrdBackend
offset
- Starting file offsetb
- Buffer which receives bytes read from the file.java.io.IOException
- Thrown in case of I/O error.public long getLength() throws java.io.IOException
getLength
クラス内 RrdBackend
java.io.IOException
- Thrown in case of I/O error.protected void setLength(long length) throws java.io.IOException
setLength
クラス内 RrdBackend
length
- Length of the RRD filejava.io.IOException
- Thrown in case of I/O error.