Overview Package Class Tree Deprecated Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
org.apache.catalina.util
Class XMLWriterjava.lang.Object org.apache.catalina.util.XMLWriter
- public class XMLWriter
- extends java.lang.Object
XMLWriter helper class.
- Author:
- Remy Maucherat
Field Summary protected java.lang.StringBuffer buffer
Buffer.static int CLOSING
Closing tag.static int NO_CONTENT
Element with no content.static int OPENING
Opening tag.protected java.io.Writer writer
Writer.
Constructor Summary XMLWriter()
Constructor.XMLWriter(java.io.Writer writer)
Constructor.
Method Summary void sendData()
Send data and reinitializes buffer.java.lang.String toString()
Retrieve generated XML.void writeData(java.lang.String data)
Write data.void writeElement(java.lang.String namespace, java.lang.String name, int type)
Write an element.void writeElement(java.lang.String namespace, java.lang.String namespaceInfo, java.lang.String name, int type)
Write an element.void writeProperty(java.lang.String namespace, java.lang.String name)
Write property to the XML.void writeProperty(java.lang.String namespace, java.lang.String name, java.lang.String value)
Write property to the XML.void writeProperty(java.lang.String namespace, java.lang.String namespaceInfo, java.lang.String name, java.lang.String value)
Write property to the XML.void writeText(java.lang.String text)
Write text.void writeXMLHeader()
Write XML Header.
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail OPENING
public static final int OPENING
- Opening tag.
- See Also:
- Constant Field Values
CLOSING
public static final int CLOSING
- Closing tag.
- See Also:
- Constant Field Values
NO_CONTENT
public static final int NO_CONTENT
- Element with no content.
- See Also:
- Constant Field Values
buffer
protected java.lang.StringBuffer buffer
- Buffer.
writer
protected java.io.Writer writer
- Writer.
Constructor Detail XMLWriter
public XMLWriter()
- Constructor.
XMLWriter
public XMLWriter(java.io.Writer writer)
- Constructor.
Method Detail toString
public java.lang.String toString()
- Retrieve generated XML.
- Returns:
- String containing the generated XML
writeProperty
public void writeProperty(java.lang.String namespace, java.lang.String namespaceInfo, java.lang.String name, java.lang.String value)
- Write property to the XML.
- Parameters:
- namespace - Namespace
- namespaceInfo - Namespace info
- name - Property name
- value - Property value
writeProperty
public void writeProperty(java.lang.String namespace, java.lang.String name, java.lang.String value)
- Write property to the XML.
- Parameters:
- namespace - Namespace
- name - Property name
- value - Property value
writeProperty
public void writeProperty(java.lang.String namespace, java.lang.String name)
- Write property to the XML.
- Parameters:
- namespace - Namespace
- name - Property name
writeElement
public void writeElement(java.lang.String namespace, java.lang.String name, int type)
- Write an element.
- Parameters:
- name - Element name
- namespace - Namespace abbreviation
- type - Element type
writeElement
public void writeElement(java.lang.String namespace, java.lang.String namespaceInfo, java.lang.String name, int type)
- Write an element.
- Parameters:
- namespace - Namespace abbreviation
- namespaceInfo - Namespace info
- name - Element name
- type - Element type
writeText
public void writeText(java.lang.String text)
- Write text.
- Parameters:
- text - Text to append
writeData
public void writeData(java.lang.String data)
- Write data.
- Parameters:
- data - Data to append
writeXMLHeader
public void writeXMLHeader()
- Write XML Header.
sendData
public void sendData() throws java.io.IOException
- Send data and reinitializes buffer.
- Throws:
- java.io.IOException
Overview Package Class Tree Deprecated Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.