java.lang.Object
org.rrd4j.graph.RrdGraphDef.FileImageSource
All Implemented Interfaces:
RrdGraphDef.ImageSource
Enclosing class:
RrdGraphDef

private static class RrdGraphDef.FileImageSourceextends Object implements RrdGraphDef.ImageSource
FileImageSource class.
  • Field Details

    • imagesource

      private final File imagesource
      The image file to embed.
  • Constructor Details

    • FileImageSource

      FileImageSource(String imagesource)
      Names the image file to embed.
      Parameters:
      imagesource - the file's path
  • Method Details

    • apply

      public BufferedImage apply(int w, int h) throws IOException
      Decode the image file into a BufferedImage.
      Specified by:
      apply in interface RrdGraphDef.ImageSource
      Parameters:
      w - the width of the requested image
      h - the high of the requested image
      Returns:
      an image to draw.
      Throws:
      IOException - if an error occurs during image reading or generation