org.rrd4j.graph

## Class RrdGraphInfo

- java.lang.Object
- - org.rrd4j.graph.RrdGraphInfo

-     public class RrdGraphInfo
      extends Object

  Class to represent successfully created Rrd4j graph. Objects of this class are created by method `RrdGraph.getRrdGraphInfo()`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) java.util.function.Supplier<Integer>` | `bytesCount`
    `(package private) java.util.function.Supplier<byte[]>` | `bytesSource`
    `(package private) String` | `filename`
    `(package private) int` | `height`
    `(package private) String` | `imgInfo`
    `(package private) int` | `width`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RrdGraphInfo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `addPrintLine(String printLine)`
    `String` | `dump()` Dumps complete graph information.
    `int` | `getByteCount()` Returns the number of bytes in the graph file
    `byte[]` | `getBytes()` Returns graph bytes
    `String` | `getFilename()` Returns filename of the graph
    `int` | `getHeight()` Returns total graph height
    `String` | `getImgInfo()` Returns image information requested by `RrdGraphDef.setImageInfo(String)` method
    `String[]` | `getPrintLines()` Returns PRINT lines requested by `RrdGraphDef.print(String, org.rrd4j.ConsolFun, String)` method.
    `int` | `getWidth()` Returns total graph width

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### bytesCount

          java.util.function.Supplier<Integer> bytesCount

    - #### bytesSource

          java.util.function.Supplier<byte[]> bytesSource

    - #### filename

          String filename

    - #### height

          int height

    - #### imgInfo

          String imgInfo

    - #### width

          int width

  - ### Constructor Detail

    - #### RrdGraphInfo

          RrdGraphInfo()

  - ### Method Detail

    - #### addPrintLine

          void addPrintLine(String printLine)

    - #### dump

          public String dump()

      Dumps complete graph information. Useful for debugging purposes.
      Returns:
        String containing complete graph information

    - #### getByteCount

          public int getByteCount()

      Returns the number of bytes in the graph file
      Returns:
        Length of the graph file
      Throws:
        `IllegalStateException` - if the images bytes are unavailable

    - #### getBytes

          public byte[] getBytes()

      Returns graph bytes
      Returns:
        Graph bytes
      Throws:
        `IllegalStateException` - if the images bytes are unavailable or can't be read

    - #### getFilename

          public String getFilename()

      Returns filename of the graph
      Returns:
        filename of the graph. '-' denotes in-memory graph (no file created)

    - #### getHeight

          public int getHeight()

      Returns total graph height
      Returns:
        total graph height

    - #### getImgInfo

          public String getImgInfo()

      Returns image information requested by `RrdGraphDef.setImageInfo(String)` method
      Returns:
        Image information

    - #### getPrintLines

          public String[] getPrintLines()

      Returns PRINT lines requested by `RrdGraphDef.print(String, org.rrd4j.ConsolFun, String)` method.
      Returns:
        An array of formatted PRINT lines

    - #### getWidth

          public int getWidth()

      Returns total graph width
      Returns:
        total graph width