/** * <p>Writes the RRD content to OutputStream using XML format. This format * is fully compatible with RRDTool's XML dump format and can be used for conversion * purposes or debugging.</p> * * @param destination Output stream to receive XML data * @throws IOException Thrown in case of I/O related error */ public synchronized void dumpXml(OutputStream destination) throws IOException { XmlWriter writer = new XmlWriter(destination); writer.startTag("rrd"); // dump header header.appendXml(writer); // dump datasources for (Datasource datasource : datasources) { datasource.appendXml(writer); } // dump archives for (Archive archive : archives) { archive.appendXml(writer); } writer.closeTag(); writer.flush(); }
/** * Writes the RRD content to OutputStream using XML format. This format * is fully compatible with RRDTool's XML dump format and can be used for conversion * purposes or debugging. * * @param destination Output stream to receive XML data * @throws java.io.IOException Thrown in case of I/O related error */ public synchronized void dumpXml(OutputStream destination) throws IOException { XmlWriter writer = new XmlWriter(destination); writer.startTag("rrd"); // dump header header.appendXml(writer); // dump datasources for (Datasource datasource : datasources) { datasource.appendXml(writer); } // dump archives for (Archive archive : archives) { archive.appendXml(writer); } writer.closeTag(); writer.flush(); }