public class RRDFile extends Object implements Constants
Currently this can read RRD files that were generated on Solaris (Sparc) and Linux (x86).
Modifier and Type | Field and Description |
---|---|
(package private) int |
alignment |
(package private) boolean |
bigEndian |
(package private) byte[] |
buffer |
(package private) boolean |
debug |
(package private) RandomAccessFile |
ras |
CF_NAM_SIZE, COOKIE, DS_NAM_SIZE, DST_SIZE, FLOAT_COOKIE, FLOAT_COOKIE_BIG_ENDIAN, FLOAT_COOKIE_LITTLE_ENDIAN, LAST_DS_LEN, VERSION, VERSION3
Constructor and Description |
---|
RRDFile(File file) |
RRDFile(String name) |
Modifier and Type | Method and Description |
---|---|
(package private) int |
align() |
(package private) int |
align(int boundary) |
(package private) void |
close() |
(package private) int |
getAlignment() |
(package private) long |
getFilePointer() |
(package private) long |
info() |
(package private) boolean |
isBigEndian() |
(package private) double |
readDouble() |
(package private) int |
readInt() |
(package private) int |
readInt(boolean dump)
Reads the next integer (4 or 8 bytes depending on alignment), advancing the file pointer
and returns it
If the alignment is 8-bytes (64-bit), then 8 bytes are read, but only the lower 4-bytes (32-bits) are
returned.
|
(package private) String |
readString(int maxLength) |
(package private) void |
skipBytes(int n) |
boolean bigEndian
boolean debug
int alignment
RandomAccessFile ras
byte[] buffer
RRDFile(String name) throws IOException, RrdException
IOException
RrdException
RRDFile(File file) throws IOException, RrdException
IOException
RrdException
boolean isBigEndian()
int getAlignment()
double readDouble() throws IOException, RrdException
IOException
RrdException
int readInt() throws IOException, RrdException
IOException
RrdException
int readInt(boolean dump) throws IOException, RrdException
IOException
- - A file access errorRrdException
- - Not enough bytes were left in the file to read the integer.String readString(int maxLength) throws IOException, RrdException
IOException
RrdException
void skipBytes(int n) throws IOException
IOException
int align(int boundary) throws IOException
IOException
int align() throws IOException
IOException
long info() throws IOException
IOException
long getFilePointer() throws IOException
IOException
void close() throws IOException
IOException