org.jfree.xml.writer
public class XMLWriterSupport extends Object
Field Summary | |
---|---|
static boolean | CLOSE A constant for close. |
static int | CLOSE_TAG_DECREASE A constant for controlling the indent function. |
static int | INDENT_ONLY A constant for controlling the indent function. |
static boolean | OPEN A constant for open. |
static int | OPEN_TAG_INCREASE A constant for controlling the indent function. |
Constructor Summary | |
---|---|
XMLWriterSupport()
Default Constructor. | |
XMLWriterSupport(SafeTagList safeTags, int indentLevel)
Creates a new support instance.
| |
XMLWriterSupport(SafeTagList safeTags, int indentLevel, String indentString)
Creates a new support instance.
|
Method Summary | |
---|---|
void | allowLineBreak()
Forces a linebreak on the next call to writeTag or writeCloseTag.
|
protected void | decreaseIndent()
Decreates the indention by one level. |
void | endBlock()
Ends the current block by decreasing the indent level.
|
int | getIndentLevel()
Returns the current indent level.
|
static String | getLineSeparator()
Returns the line separator.
|
SafeTagList | getSafeTags()
Returns the list of safe tags.
|
protected void | increaseIndent()
Increases the indention by one level. |
void | indent(Writer writer, int increase)
Indent the line. |
static String | normalize(String s)
Normalises a string, replacing certain characters with their escape
sequences so that the XML text is not corrupted.
|
void | startBlock()
Starts a new block by increasing the indent level.
|
void | writeCloseTag(Writer w, String tag)
Writes a closing XML tag.
|
void | writeTag(Writer w, String name)
Writes an opening XML tag that has no attributes.
|
void | writeTag(Writer w, String name, String attributeName, String attributeValue, boolean close)
Writes an opening XML tag with an attribute/value pair.
|
void | writeTag(Writer w, String name, Properties attributes, boolean close)
Writes an opening XML tag along with a list of attribute/value pairs.
|
void | writeTag(Writer w, String name, AttributeList attributes, boolean close)
Writes an opening XML tag along with a list of attribute/value pairs.
|
Parameters: safeTags tags that are safe for line breaks. indentLevel the index level.
Parameters: safeTags the tags that are safe for line breaks. indentLevel the indent level. indentString the indent string.
Throws: IOException if an IO error occurs.
Throws: IOException if an IO error occurs.
Returns: the current indent level.
Returns: the line separator.
Returns: The list.
Parameters: writer the writer which should receive the indentention. increase the current indent level.
Throws: java.io.IOException if writing the stream failed.
Parameters: s the string.
Returns: the normalised string.
Throws: IOException if an IO error occurs.
Parameters: w the writer. tag the tag name.
Throws: java.io.IOException if there is an I/O problem.
Parameters: w the writer. name the tag name.
Throws: java.io.IOException if there is an I/O problem.
Parameters: w the writer. name the tag name. attributeName the attribute name. attributeValue the attribute value. close controls whether the tag is closed.
Throws: java.io.IOException if there is an I/O problem.
Deprecated: use the attribute list instead of the properties.
Writes an opening XML tag along with a list of attribute/value pairs.Parameters: w the writer. name the tag name. attributes the attributes. close controls whether the tag is closed.
Throws: java.io.IOException if there is an I/O problem.
Parameters: w the writer. name the tag name. attributes the attributes. close controls whether the tag is closed.
Throws: java.io.IOException if there is an I/O problem.