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 Object
- implements XmlWriter
Provides a few method implementations for XmlWriter implementations.
The method implementations all depend on other methods which must
be implemented.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractXmlWriter
public AbstractXmlWriter()
writeXmlVersion
public XmlWriter writeXmlVersion()
throws 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
- Throws:
IOException
writeXmlVersion
public XmlWriter writeXmlVersion(String version,
String encoding)
throws IOException
- Specified by:
writeXmlVersion in interface XmlWriter
- Throws:
IOException- See Also:
XmlWriter.writeXmlVersion(String, String, String)
writeEntityWithText
public XmlWriter writeEntityWithText(String name,
Object text)
throws IOException
- A helper method. It writes out an entity which contains only text.
- Specified by:
writeEntityWithText in interface XmlWriter
- Parameters:
name - String name of tagtext - String of text to go inside the tag
- Throws:
IOException
writeEmptyEntity
public XmlWriter writeEmptyEntity(String name)
throws IOException
- A helper method. It writes out empty entities.
- Specified by:
writeEmptyEntity in interface XmlWriter
- Parameters:
name - String name of tag
- Throws:
IOException
Copyright © 2000-2007 OSJava. All Rights Reserved.