Class RrdConvertUtils


  • public class RrdConvertUtils
    extends Object
    The Class RRD Conversion Utilities.
    Author:
    Alejandro Galue
    • Method Detail

      • dumpJrb

        public static RRDv1 dumpJrb​(File sourceFile)
                             throws IOException,
                                    org.jrobin.core.RrdException
        Dumps a JRB.
        Parameters:
        sourceFile - the source file
        Returns:
        the RRD Object (old version)
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.jrobin.core.RrdException - the RRD exception
      • dumpRrd

        public static RRDv3 dumpRrd​(File sourceFile)
                             throws IOException,
                                    org.jrobin.core.RrdException
        Dumps a RRD.
        Parameters:
        sourceFile - the source file
        Returns:
        the RRD Object
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.jrobin.core.RrdException - the RRD exception
      • restoreJrb

        public static void restoreJrb​(RRDv1 rrd,
                                      File targetFile)
                               throws IOException,
                                      org.jrobin.core.RrdException
        Restore a JRB.
        Parameters:
        rrd - the RRD object (old version)
        targetFile - the target file
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.jrobin.core.RrdException - the RRD exception
      • restoreRrd

        public static void restoreRrd​(RRDv3 rrd,
                                      File targetFile)
                               throws IOException,
                                      org.jrobin.core.RrdException
        Restores a RRD.
        Parameters:
        rrd - the RRD object
        targetFile - the target file
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.jrobin.core.RrdException - the RRD exception
      • convertFromRrdToJrobin

        public static void convertFromRrdToJrobin​(File sourceRrdFile,
                                                  File targetJrobinFile)
                                           throws IOException,
                                                  org.jrobin.core.RrdException
        Convert from RRDtool to JRobin.
        Parameters:
        sourceRrdFile - the source RRDtool file
        targetJrobinFile - the target JRobin file
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.jrobin.core.RrdException - the RRD exception
      • convertFromJrobinToRrd

        public static void convertFromJrobinToRrd​(File sourceJrobinFile,
                                                  File targetRrdFile)
                                           throws IOException,
                                                  org.jrobin.core.RrdException
        Convert from JRobin to RRDtool.
        Parameters:
        sourceJrobinFile - the source JRobin file
        targetRrdFile - the target RRDtool file
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.jrobin.core.RrdException - the RRD exception
      • convert

        protected static RRDv3 convert​(RRDv1 jrb)
                                throws IllegalArgumentException
        Converts a JRobin object into an RRDtool object.
        Parameters:
        jrb - the source JRobin object representation
        Returns:
        the RRDtool object representation
        Throws:
        IllegalArgumentException - the illegal argument exception (when the conversion is not possible)
      • convert

        protected static RRDv1 convert​(RRDv3 rrd)
                                throws IllegalArgumentException
        Converts a RRDtool object into a JRobin object.
        Parameters:
        rrd - the RRDtool object representation
        Returns:
        the JRobin object representation
        Throws:
        IllegalArgumentException - the illegal argument exception (when the conversion is not possible)