/** * Print out a <code>{@link CDATA}</code> node. * * @param cdata * <code>CDATA</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(CDATA cdata, OutputStream out) throws IOException { output(cdata, makeWriter(out, myFormat)); // output() flushes }
/** * Print out a <code>{@link EntityRef}</code>. * * @param entity * <code>EntityRef</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public void output(EntityRef entity, OutputStream out) throws IOException { output(entity, makeWriter(out, myFormat)); // output() flushes }
/** * Print out a <code>{@link Comment}</code>. * * @param comment * <code>Comment</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(Comment comment, OutputStream out) throws IOException { output(comment, makeWriter(out, myFormat)); // output() flushes }
/** * Print out a <code>{@link Text}</code> node. Perfoms the necessary entity * escaping and whitespace stripping. * * @param text * <code>Text</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(Text text, OutputStream out) throws IOException { output(text, makeWriter(out, myFormat)); // output() flushes }
/** * This will print the <code>{@link DocType}</code> to the given * OutputStream. * * @param doctype * <code>DocType</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(DocType doctype, OutputStream out) throws IOException { output(doctype, makeWriter(out, myFormat)); }
/** * Print out a <code>{@link ProcessingInstruction}</code>. * * @param pi * <code>ProcessingInstruction</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(ProcessingInstruction pi, OutputStream out) throws IOException { output(pi, makeWriter(out, myFormat)); // output() flushes }
/** * Print out an <code>{@link Element}</code>, including its * <code>{@link Attribute}</code>s, and all contained (child) elements, etc. * * @param element * <code>Element</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(Element element, OutputStream out) throws IOException { output(element, makeWriter(out, myFormat)); }
/** * This will print the <code>{@link Document}</code> to the given * OutputStream. The characters are printed using the encoding specified in * the constructor, or a default of UTF-8. * * @param doc * <code>Document</code> to format. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void output(Document doc, OutputStream out) throws IOException { output(doc, makeWriter(out, myFormat)); }
/** * This will handle printing out an <code>{@link * Element}</code>'s content only, not including its tag, and attributes. * This can be useful for printing the content of an element that contains * HTML, like "<description>JDOM is * <b>fun>!</description>". * * @param element * <code>Element</code> to output. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws NullPointerException * if the specified content is null. */ public final void outputElementContent(Element element, OutputStream out) throws IOException { outputElementContent(element, makeWriter(out, myFormat)); }
/** * This will handle printing out a list of nodes. This can be useful for * printing the content of an element that contains HTML, like * "<description>JDOM is <b>fun>!</description>". * <p> * The list is assumed to contain legal JDOM nodes. If other content is * coerced on to the list it will cause ClassCastExceptions, and null Lists * or null list members will cause NullPointerException. * * @param list * <code>List</code> of nodes. * @param out * <code>OutputStream</code> to use. * @throws IOException * if there's any problem writing. * @throws ClassCastException * if non-{@link Content} is forced in to the list * @throws NullPointerException * if the List is null or contains null members. */ public final void output(List<? extends Content> list, OutputStream out) throws IOException { output(list, makeWriter(out, myFormat)); // output() flushes }