public class XMLWriter extends XMLWriterSupport
CLOSE, CLOSE_TAG_DECREASE, INDENT_ONLY, OPEN, OPEN_TAG_INCREASE
Constructor and Description |
---|
XMLWriter(Writer writer)
Creates a new XML writer for the specified character stream.
|
XMLWriter(Writer writer,
String indentString)
Creates a new XML writer for the specified character stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying character stream.
|
void |
writeCloseTag(String tag)
Writes a closing XML tag.
|
void |
writeTag(String name,
AttributeList attributes,
boolean close)
Writes an opening XML tag along with a list of attribute/value pairs.
|
void |
writeTag(String name,
boolean close)
Writes an opening XML tag that has no attributes.
|
void |
writeTag(String name,
Properties attributes,
boolean close)
Deprecated.
use the attribute list instead ...
|
void |
writeTag(String name,
String attributeName,
String attributeValue,
boolean close)
Writes an opening XML tag with an attribute/value pair.
|
void |
writeText(String text)
Writes some text to the character stream.
|
void |
writeXmlDeclaration()
Writes the XML declaration that usually appears at the top of every XML
file.
|
allowLineBreak, decreaseIndent, endBlock, getIndentLevel, getLineSeparator, getSafeTags, increaseIndent, indent, normalize, startBlock, writeCloseTag, writeTag, writeTag, writeTag, writeTag
public XMLWriter(Writer writer)
writer
- the character stream.public void writeXmlDeclaration() throws IOException
IOException
- if there is a problem writing to the character
stream.public void writeTag(String name, boolean close) throws IOException
name
- the tag name.close
- a flag that controls whether or not the tag is closed
immediately.IOException
- if there is an I/O problem.public void writeCloseTag(String tag) throws IOException
tag
- the tag name.IOException
- if there is an I/O problem.public void writeTag(String name, String attributeName, String attributeValue, boolean close) throws IOException
name
- the tag name.attributeName
- the attribute name.attributeValue
- the attribute value.close
- controls whether the tag is closed.IOException
- if there is an I/O problem.public void writeTag(String name, AttributeList attributes, boolean close) throws IOException
name
- the tag name.attributes
- the attributes.close
- controls whether the tag is closed.IOException
- if there is an I/O problem.public void writeTag(String name, Properties attributes, boolean close) throws IOException
name
- the tag name.attributes
- the attributes.close
- controls whether the tag is closed.IOException
- if there is an I/O problem.public void writeText(String text) throws IOException
text
- the text.IOException
- if there is a problem writing to the character
stream.public void close() throws IOException
IOException
- if there is a problem closing the character stream.Copyright © 2001–2018 JFree.org. All rights reserved.