com.mmoui.manager.services
Interface ConfigurationService.XMLStreamWriter

Enclosing interface:
ConfigurationService

public static interface ConfigurationService.XMLStreamWriter

Defines an interface through which services can output XML data. This interface is designed to mimic Java 6's XMLStreamWriter but is implemented for compatibility with Java 5.

Since:
2.2.2
Version:
$Id: ConfigurationService.java 223 2009-05-14 10:10:05Z mpdelbuono $
Author:
Matthew P. Del Buono

Method Summary
 void writeAttribute(java.lang.String name, java.lang.String value)
          Writes the specified key-value pair as an attribute to the most recent XML element.
 void writeCData(java.lang.String data)
          Writes arbitrary data, as a CDATA section, to the XML stream
 void writeCharacters(char[] buffer, int start, int len)
          Writes arbitrary data to the XML stream
 void writeCharacters(java.lang.String data)
          Writes arbitrary data to the XML stream
 void writeEmptyElement(java.lang.String name)
          Writes an empty element (e.g., <Foo /> to the XML stream
 void writeEndElement()
          Closes the most recently opened element (e.g., with </Foo>)
 void writeStartElement(java.lang.String name)
          Writes the start element (e.g., <Foo>) to the XML stream
 

Method Detail

writeStartElement

void writeStartElement(java.lang.String name)
                       throws java.io.IOException
Writes the start element (e.g., <Foo>) to the XML stream

Parameters:
name - the name of the element
Throws:
java.io.IOException - if an I/O error occurs while writing the element

writeEndElement

void writeEndElement()
                     throws java.io.IOException
Closes the most recently opened element (e.g., with </Foo>)

Throws:
java.io.IOException - if an I/O error occurs while writing the close tag

writeEmptyElement

void writeEmptyElement(java.lang.String name)
                       throws java.io.IOException
Writes an empty element (e.g., <Foo /> to the XML stream

Parameters:
name - the name of the element
Throws:
java.io.IOException - if an I/O error occurs while writing the tag

writeAttribute

void writeAttribute(java.lang.String name,
                    java.lang.String value)
                    throws java.io.IOException
Writes the specified key-value pair as an attribute to the most recent XML element.

Parameters:
name - the name of the attribute
value - the value of the attribute
Throws:
java.io.IOException - if an exception occurs while writing the attribute

writeCData

void writeCData(java.lang.String data)
                throws java.io.IOException
Writes arbitrary data, as a CDATA section, to the XML stream

Parameters:
data - the data to write
Throws:
java.io.IOException - if an I/O exception occurs while writing the data

writeCharacters

void writeCharacters(java.lang.String data)
                     throws java.io.IOException
Writes arbitrary data to the XML stream

Parameters:
data - data the data to write
Throws:
java.io.IOException - is an I/O exception occurs while writing the data

writeCharacters

void writeCharacters(char[] buffer,
                     int start,
                     int len)
                     throws java.io.IOException
Writes arbitrary data to the XML stream

Parameters:
buffer - the buffer from which to read the data
start - the 0-based start index in the buffer from which to read the data
len - the length of the data to read from the buffer
Throws:
java.io.IOException - if an I/O exception occurs while writing the data