java.lang.Object
org.rrd4j.core.jrrd.Header
All Implemented Interfaces:
Constants

public class Headerextends Object implements Constants
Instances of this class model the header section of an RRD file.
  • Field Details

    • offset

      private static final long offset
      Start of the header within the buffer.
      See Also:
    • size

      private final long size
      Size of the header in bytes.
    • version

      final String version
      the database version string
    • iVersion

      private final int iVersion
      the database version as integer
    • dsCount

      final int dsCount
      Number of data sources
    • rraCount

      final int rraCount
      Number of archives within file
    • pdpStep

      final int pdpStep
      Primary data point step
  • Constructor Details

    • Header

      Header(RRDFile file) throws IOException
      Constructs a Header from the RRD file.
      Parameters:
      file - the RRD file to read from
      Throws:
      IOException - if the RRD file cannot be read
  • Method Details

    • getVersion

      public String getVersion()
      Returns the version of the database.
      Returns:
      the version of the database.
    • getVersionAsInt

      public int getVersionAsInt()
      Returns the version of the database as an integer.
      Returns:
      the version of the database.
    • getDSCount

      public int getDSCount()
      Returns the number of DataSources in the database.
      Returns:
      the number of DataSources in the database.
    • getRRACount

      public int getRRACount()
      Returns the number of Archives in the database.
      Returns:
      the number of Archives in the database.
    • getPDPStep

      public int getPDPStep()
      Returns the primary data point interval in seconds.
      Returns:
      the primary data point interval in seconds.
    • toString

      public String toString()
      Returns a summary the contents of this header.
      Overrides:
      toString in class Object
      Returns:
      a summary of the information contained in this header.