public class

XmlWriter

extends Object
java.lang.Object
   ↳ org.rrd4j.core.XmlWriter

Class Overview

Extremely simple utility class used to create XML documents.

Summary

Public Constructors
XmlWriter(OutputStream stream)
Creates XmlWriter with the specified output stream to send XML code to.
Public Methods
void closeTag()
Closes the corresponding XML tag
void flush()
Flushes the output stream
void startTag(String tag)
Opens XML tag
void writeComment(Object comment)
Writes XML comment to output stream
void writeTag(String tag, int value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, double value, String nanString)
Writes <tag>value</tag> to output stream
void writeTag(String tag, Object value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, Color value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, long value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, Font value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, boolean value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, double value)
Writes <tag>value</tag> to output stream
void writeTag(String tag, File value)
Writes <tag>value</tag> to output stream
Protected Methods
void finalize()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public XmlWriter (OutputStream stream)

Creates XmlWriter with the specified output stream to send XML code to.

Parameters
stream Output stream which receives XML code

Public Methods

public void closeTag ()

Closes the corresponding XML tag

public void flush ()

Flushes the output stream

public void startTag (String tag)

Opens XML tag

Parameters
tag XML tag name

public void writeComment (Object comment)

Writes XML comment to output stream

Parameters
comment comment string

public void writeTag (String tag, int value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, double value, String nanString)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, Object value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, Color value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, long value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, Font value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, boolean value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, double value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

public void writeTag (String tag, File value)

Writes <tag>value</tag> to output stream

Parameters
tag XML tag name
value value to be placed between <tag> and </tag>

Protected Methods

protected void finalize ()