/** * <p>Exports RrdDef object to output stream in XML format. Generated XML code can be parsed * with {@link org.rrd4j.core.RrdDefTemplate} class.</p> * <p>It use a format compatible with previous RRD4J's version, using * a path, instead of an URI.</p> * * @param out Output stream */ public void exportXmlTemplate(OutputStream out) { exportXmlTemplate(out, true); }
/** * <p>Exports RrdDef object to a file in XML format. Generated XML code can be parsed * with {@link org.rrd4j.core.RrdDefTemplate} class.</p> * <p>It use a format compatible with previous RRD4J's version, using * a path, instead of an URI.</p> * * @param filePath Path to the file * @throws java.io.IOException if any. */ public void exportXmlTemplate(String filePath) throws IOException { exportXmlTemplate(filePath, true); }
/** * Exports RrdDef object to string in XML format. Generated XML string can be parsed * with {@link RrdDefTemplate} class. * * @return XML formatted string representing this RrdDef object */ public String exportXmlTemplate() { ByteArrayOutputStream out = new ByteArrayOutputStream(); exportXmlTemplate(out); return out.toString(); }
/** * Exports RrdDef object to a file in XML format. Generated XML code can be parsed * with {@link RrdDefTemplate} class. * * @param filePath Path to the file */ public void exportXmlTemplate(String filePath) throws IOException { FileOutputStream out = new FileOutputStream(filePath, false); exportXmlTemplate(out); out.close(); }
/** * <p>Exports RrdDef object to string in XML format. Generated XML string can be parsed * with {@link org.rrd4j.core.RrdDefTemplate} class.</p> * <p>It use a format compatible with previous RRD4J's version, using * a path, instead of an URI.</p> * * @return XML formatted string representing this RrdDef object */ public String exportXmlTemplate() { ByteArrayOutputStream out = new ByteArrayOutputStream(); exportXmlTemplate(out); return out.toString(); }
/** * <p>Exports RrdDef object to string in XML format. Generated XML string can be parsed * with {@link org.rrd4j.core.RrdDefTemplate} class.</p> * <p>If <code>compatible</code> is set to true, it returns an XML compatible with previous RRD4J's versions, using * a path, instead of an URI.</p> * * * @param compatible Compatible with previous versions. * @return XML formatted string representing this RrdDef object */ public String exportXmlTemplate(boolean compatible) { ByteArrayOutputStream out = new ByteArrayOutputStream(); exportXmlTemplate(out, compatible); return out.toString(); }
/** * <p>Exports RrdDef object to a file in XML format. Generated XML code can be parsed * with {@link org.rrd4j.core.RrdDefTemplate} class.</p> * <p>If <code>compatible</code> is set to true, it returns an XML compatible with previous RRD4J versions, using * a path, instead of an URI.</p> * * @param filePath Path to the file * @param compatible Compatible with previous versions. * @throws java.io.IOException if any. */ public void exportXmlTemplate(String filePath, boolean compatible) throws IOException { FileOutputStream out = new FileOutputStream(filePath, false); exportXmlTemplate(out, compatible); out.close(); }