com.generationjava.io.xml
Class AbstractXmlWriter

java.lang.Object
  |
  +--com.generationjava.io.xml.AbstractXmlWriter
All Implemented Interfaces:
XmlWriter
Direct Known Subclasses:
SimpleXmlWriter, XmlEncXmlWriter

public abstract class AbstractXmlWriter
extends java.lang.Object
implements XmlWriter


Constructor Summary
AbstractXmlWriter()
           
 
Method Summary
 XmlWriter writeEmptyEntity(java.lang.String name)
          A helper method.
 XmlWriter writeEntityWithText(java.lang.String name, java.lang.Object text)
          A helper method.
 XmlWriter writeXmlVersion()
          Makes it easy to output the xml version if such a thing is desired.
 XmlWriter writeXmlVersion(java.lang.String version, java.lang.String encoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.generationjava.io.xml.XmlWriter
close, endEntity, getWriter, writeAttribute, writeCData, writeComment, writeEntity, writeText, writeXmlVersion
 

Constructor Detail

AbstractXmlWriter

public AbstractXmlWriter()
Method Detail

writeXmlVersion

public XmlWriter writeXmlVersion()
                          throws java.io.IOException
Makes it easy to output the xml version if such a thing is desired. While it usually is desired, it is less surprising not to handle it.

Specified by:
writeXmlVersion in interface XmlWriter
java.io.IOException

writeXmlVersion

public XmlWriter writeXmlVersion(java.lang.String version,
                                 java.lang.String encoding)
                          throws java.io.IOException
Specified by:
writeXmlVersion in interface XmlWriter
java.io.IOException
See Also:
XmlWriter.writeXmlVersion(String, String, String)

writeEntityWithText

public XmlWriter writeEntityWithText(java.lang.String name,
                                     java.lang.Object text)
                              throws java.io.IOException
A helper method. It writes out an entity which contains only text.

Specified by:
writeEntityWithText in interface XmlWriter
Parameters:
name - String name of tag
text - String of text to go inside the tag
java.io.IOException

writeEmptyEntity

public XmlWriter writeEmptyEntity(java.lang.String name)
                           throws java.io.IOException
A helper method. It writes out empty entities.

Specified by:
writeEmptyEntity in interface XmlWriter
Parameters:
name - String name of tag
java.io.IOException


Copyright © 2000-2003 GenerationJava. All Rights Reserved.