Package org.rrd4j.core.jrrd
Class RRDFile
- java.lang.Object
-
- org.rrd4j.core.jrrd.RRDFile
-
- All Implemented Interfaces:
Constants
class RRDFile extends Object implements Constants
This class is used read information from an RRD file. Writing to RRD files is not currently supported. It uses NIO's RandomAccessFile to read the file Currently this can read RRD files that were generated on Solaris (Sparc) and Linux (x86).- Version:
- $Revision: 1.1 $
- Author:
- Ciaran Treanor
-
-
Field Summary
-
Fields inherited from interface org.rrd4j.core.jrrd.Constants
CF_NAM_SIZE, COOKIE, DS_NAM_SIZE, DST_SIZE, FLOAT_COOKIE, LAST_DS_LEN, MAX_SUPPORTED_VERSION, SIZE_OF_DOUBLE, UNDEFINED_VERSION, UNDEFINED_VERSION_AS_INT, VERSION_WITH_LAST_UPDATE_SEC
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intalign()(package private) intalign(int boundary)(package private) voidclose()(package private) intgetAlignment()(package private) intgetBits()(package private) longgetFilePointer()(package private) UnivalArraygetUnivalArray(int size)(package private) longinfo()(package private) booleanisBigEndian()(package private) voidread(ByteBuffer bb)(package private) doublereadDouble()(package private) intreadInt()(package private) intreadLong()(package private) StringreadString(int maxLength)voidseek(long position)voidseekToEndOfFile()(package private) voidskipBytes(int n)
-
-
-
Constructor Detail
-
RRDFile
RRDFile(String name) throws IOException
- Throws:
IOException
-
RRDFile
RRDFile(File file) throws IOException
- Throws:
IOException
-
-
Method Detail
-
isBigEndian
boolean isBigEndian()
-
getAlignment
int getAlignment()
-
readDouble
double readDouble() throws IOException- Throws:
IOException
-
readInt
int readInt() throws IOException- Throws:
IOException
-
readLong
int readLong() throws IOException- Throws:
IOException
-
readString
String readString(int maxLength) throws IOException
- Throws:
IOException
-
skipBytes
void skipBytes(int n) throws IOException- Throws:
IOException
-
align
int align(int boundary) throws IOException
- Throws:
IOException
-
align
int align() throws IOException
- Throws:
IOException
-
info
long info() throws IOException
- Throws:
IOException
-
getFilePointer
long getFilePointer() throws IOException- Throws:
IOException
-
close
void close() throws IOException- Throws:
IOException
-
read
void read(ByteBuffer bb) throws IOException
- Throws:
IOException
-
getUnivalArray
UnivalArray getUnivalArray(int size) throws IOException
- Throws:
IOException
-
getBits
int getBits()
- Returns:
- the long size in bits for this file
-
seek
public void seek(long position)
-
seekToEndOfFile
public void seekToEndOfFile()
-
-