net.xoetrope.xml.jaxp
Class JaxpXmlWriter

java.lang.Object
  extended by net.xoetrope.xml.jaxp.JaxpXmlWriter
All Implemented Interfaces:
XmlWriter

public class JaxpXmlWriter
extends java.lang.Object
implements XmlWriter

Title: Xui

Description: Used to save the contents of an Element object to a FileOutputStream

Copyright: Copyright (c) Xoetrope Ltd., 1998-2003

Company: Xoetrope Ltd.


Constructor Summary
JaxpXmlWriter()
          null ctor
 
Method Summary
 void setOutputStream(java.io.FileOutputStream fos)
          Set the OutputStream to be used by the write function.
 void write(XmlElement xml, boolean prettyPrint, int indent)
          Write the contents of an XmlElement out to the outputstream specified by setOutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxpXmlWriter

public JaxpXmlWriter()
null ctor

Method Detail

write

public void write(XmlElement xml,
                  boolean prettyPrint,
                  int indent)
           throws java.io.IOException
Write the contents of an XmlElement out to the outputstream specified by setOutputStream

Specified by:
write in interface XmlWriter
Parameters:
xml - The root XmlElement to be output
prettyPrint - If true the XML will be output in a more readable format
indent - If true the XML will be indented
Throws:
java.io.IOException - Throw an IOException if anything goes wrong

setOutputStream

public void setOutputStream(java.io.FileOutputStream fos)
Set the OutputStream to be used by the write function. This needs to be set before writing.

Specified by:
setOutputStream in interface XmlWriter
Parameters:
fos - The FileOutputStream to which the XML will be written