de.fesenmeyer.dbnormalizer.core.configuration.xml
Class DOMDocumentWriter

java.lang.Object
  extended by de.fesenmeyer.dbnormalizer.core.configuration.xml.DOMDocumentWriter

public class DOMDocumentWriter
extends Object

Class which provides writing an arbitrary DOM-document to an OutputStream, e.g. a file.

Author:
DF
See Also:
Document

Field Summary
private  Document doc
          The DOM-document.
 
Constructor Summary
DOMDocumentWriter(Document doc)
          Class constructor specifying the DOM-document to be written to a file.
 
Method Summary
 void write(OutputStream oStream)
          Writes the DOM-Document to the OutputStream specified by argument oStream.
 void write(String fileName)
          Writes the DOM-Document to the file specified by the argument fileName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

private Document doc
The DOM-document.

Constructor Detail

DOMDocumentWriter

public DOMDocumentWriter(Document doc)
Class constructor specifying the DOM-document to be written to a file.

Parameters:
doc - the DOM-document
Method Detail

write

public void write(OutputStream oStream)
           throws TransformerException
Writes the DOM-Document to the OutputStream specified by argument oStream.

Parameters:
oStream - the OutputStream to which should be written
Throws:
TransformerException - if a XML-Transformer specific exception occurs (e.g. if no TransformerFactory is available).

write

public void write(String fileName)
           throws TransformerException,
                  IOException
Writes the DOM-Document to the file specified by the argument fileName.

Parameters:
fileName - the path of the file to which should be written
Throws:
TransformerException - if a XML-Transformer specific exception occurs (e.g. if no TransformerFactory is available).
IOException - if an IO-specific exception occurs (e.g. if there are no rights to write the file).