## org.jrobin.core
Class Header

    java.lang.Object
      org.jrobin.core.Header

All Implemented Interfaces:
  org.jrobin.core.RrdUpdater

public class Header
extends java.lang.Object
implements org.jrobin.core.RrdUpdater

Class to represent RRD header. Header information is mainly static (once set, it cannot be changed), with the exception of last update time (this value is changed whenever RRD gets updated).

Normally, you don't need to manipulate the Header object directly - JRobin framework does it for you.

Method Summary
`void` `copyStateTo(org.jrobin.core.RrdUpdater other)` Copies object's internal state to another Header object.
`int` `getArcCount()` Returns the number of archives defined in the RRD.
`int` `getDsCount()` Returns the number of datasources defined in the RRD.
`long` `getLastUpdateTime()` Returns the last update time of the RRD.
`org.jrobin.core.RrdAllocator` `getRrdAllocator()` Required to implement RrdUpdater interface.
`RrdBackend` `getRrdBackend()` Returns the underlying storage (backend) object which actually performs all I/O operations.
`java.lang.String` `getSignature()` Returns RRD signature.
`long` `getStep()` Returns primary RRD time step.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getSignature

    public java.lang.String getSignature()
                                  throws java.io.IOException

  Returns RRD signature. The returned string will be always of the form JRobin, version x.x. Note: RRD format did not change since Jrobin 1.0.0 release (and probably never will).

  Returns:
    RRD signature
  Throws:
    `java.io.IOException` - Thrown in case of I/O error

### getLastUpdateTime

    public long getLastUpdateTime()
                           throws java.io.IOException

  Returns the last update time of the RRD.

  Returns:
    Timestamp (Unix epoch, no milliseconds) corresponding to the last update time.
  Throws:
    `java.io.IOException` - Thrown in case of I/O error

### getStep

    public long getStep()
                 throws java.io.IOException

  Returns primary RRD time step.

  Returns:
    Primary time step in seconds
  Throws:
    `java.io.IOException` - Thrown in case of I/O error

### getDsCount

    public int getDsCount()
                   throws java.io.IOException

  Returns the number of datasources defined in the RRD.

  Returns:
    Number of datasources defined
  Throws:
    `java.io.IOException` - Thrown in case of I/O error

### getArcCount

    public int getArcCount()
                    throws java.io.IOException

  Returns the number of archives defined in the RRD.

  Returns:
    Number of archives defined
  Throws:
    `java.io.IOException` - Thrown in case of I/O error

### copyStateTo

    public void copyStateTo(org.jrobin.core.RrdUpdater other)
                     throws java.io.IOException,
                            RrdException

  Copies object's internal state to another Header object.

  Specified by:
    `copyStateTo` in interface `org.jrobin.core.RrdUpdater`
  Parameters:
    `other` - New Header object to copy state to
  Throws:
    `java.io.IOException` - Thrown in case of I/O error
    `RrdException` - Thrown if supplied argument is not a Header object

### getRrdBackend

    public RrdBackend getRrdBackend()

  Returns the underlying storage (backend) object which actually performs all I/O operations.

  Specified by:
    `getRrdBackend` in interface `org.jrobin.core.RrdUpdater`
  Returns:
    I/O backend object

### getRrdAllocator

    public org.jrobin.core.RrdAllocator getRrdAllocator()

  Required to implement RrdUpdater interface. You should never call this method directly.

  Specified by:
    `getRrdAllocator` in interface `org.jrobin.core.RrdUpdater`
  Returns:
    Allocator object