| java.lang.Object com.sun.tools.internal.ws.util.xml.PrettyPrintingXmlWriter
PrettyPrintingXmlWriter | public class PrettyPrintingXmlWriter (Code) | | A writer of XML output streams.
An XML writer knows hardly anything about XML document well-formedness,
to say nothing of validity. It relies upon the invoker to ensure that the
generated document is well-formed and, if required, valid.
author: WS Development Team |
Method Summary | |
public void | attribute(String name, String value) Writes an attribute for the current element. | public void | attribute(String prefix, String name, String value) Writes an attribute for the current element. | public void | attributeName(String name) Writes an attribute name for the current element. | public void | attributeName(String prefix, String name) Writes an attribute name for the current element. | public void | attributeUnquoted(String name, String value) Writes an attribute (unquoted) for the current element. | public void | attributeUnquoted(String prefix, String name, String value) Writes an attribute (unquoted) for the current element. | public void | attributeValue(String value) Writes a value for the current attribute. | public void | attributeValueToken(String token) Writes one token of the current attribute's value. | public void | attributeValueUnquoted(String value) Writes a value (unquoted) for the current attribute. | public void | chars(String chars) Writes some character data. | public void | chars(CDATA chars) | public void | charsUnquoted(String chars) Writes some character data, skipping quoting. | public void | charsUnquoted(char[] buf, int off, int len) Writes some character data, skipping quoting. | public void | close() Flushes the writer and closes the underlying byte-output stream. | public void | doctype(String root, String dtd) Writes a DOCTYPE declaration. | public void | end(String name) Writes an end tag for the named element. | public void | flush() Flushes the writer. | public void | inlineLeaf(String name, String chars) | public void | inlineLeaf(String name) | public void | leaf(String name, String chars) Writes a leaf element with the given character content. | public void | leaf(String name) Writes an empty leaf element. | public void | setQuote(char quote) Sets the quote character to be used by this writer when writing
attribute values. | public void | start(String name) Writes a start tag for the named element. |
PrettyPrintingXmlWriter | public PrettyPrintingXmlWriter(OutputStream out, String enc, boolean declare) throws UnsupportedEncodingException, IOException(Code) | | Creates a new writer that will write to the given byte-output stream
using the given encoding. An initial XML declaration will optionally be
written to the stream.
Parameters: out - The target byte-output stream Parameters: enc - The character encoding to be used Parameters: declare - If true, write the XML declaration to the output stream throws: IOException - If an I/O error occurs throws: UnsupportedEncodingException - If the named encoding is not supported |
PrettyPrintingXmlWriter | public PrettyPrintingXmlWriter(OutputStream out, String enc) throws UnsupportedEncodingException, IOException(Code) | | Creates a new writer that will write to the given byte-output stream
using the given encoding. An initial XML declaration will be written to
the stream.
Parameters: out - The target byte-output stream Parameters: enc - The character encoding to be used throws: IOException - If an I/O error occurs throws: UnsupportedEncodingException - If the named encoding is not supported |
PrettyPrintingXmlWriter | public PrettyPrintingXmlWriter(OutputStream out) throws IOException(Code) | | Creates a new writer that will write to the given byte-output stream
using the UTF-8 encoding. An initial XML declaration will be written to
the stream.
Parameters: out - The target byte-output stream throws: IOException - If an I/O error occurs |
chars | public void chars(String chars) throws IOException(Code) | | Writes some character data.
Parameters: chars - The character data to be written throws: IOException - If an I/O error occurs |
charsUnquoted | public void charsUnquoted(String chars) throws IOException(Code) | | Writes some character data, skipping quoting.
Parameters: chars - The character data to be written throws: IOException - If an I/O error occurs |
charsUnquoted | public void charsUnquoted(char[] buf, int off, int len) throws IOException(Code) | | Writes some character data, skipping quoting.
Parameters: buf - Buffer containing the character data to be written Parameters: off - The offset of the data to be written Parameters: len - The length of the data to be written throws: IOException - If an I/O error occurs |
close | public void close() throws IOException(Code) | | Flushes the writer and closes the underlying byte-output stream.
throws: IOException - If an I/O error occurs |
doctype | public void doctype(String root, String dtd) throws IOException(Code) | | Writes a DOCTYPE declaration.
Parameters: root - The name of the root element Parameters: dtd - The URI of the document-type definition throws: IOException - If an I/O error occurs |
end | public void end(String name) throws IOException(Code) | | Writes an end tag for the named element.
Parameters: name - The name to be used in the end tag throws: IOException - If an I/O error occurs |
leaf | public void leaf(String name, String chars) throws IOException(Code) | | Writes a leaf element with the given character content.
Parameters: name - ame to be used in the start and end tags Parameters: chars - character data to be written This method writes a start tag with the given name, followed by thegiven character data, followed by an end tag. If the charsparameter is null or the empty string then an empty tag iswritten. throws: IOException - If an I/O error occurs |
leaf | public void leaf(String name) throws IOException(Code) | | Writes an empty leaf element.
Parameters: name - name to be used in the empty-element tag |
setQuote | public void setQuote(char quote)(Code) | | Sets the quote character to be used by this writer when writing
attribute values.
Parameters: quote - The new quote character, either aQUOTATION MARK ('\u0022'),or an APOSTROPHE-QUOTE('\u0027') throws: IllegalArgumentException - If the argument is neither of the above characters |
start | public void start(String name) throws IOException(Code) | | Writes a start tag for the named element.
Parameters: name - The name to be used in the start tag throws: IOException - If an I/O error occurs |
|
|