|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.OutputStream
java.io.PipedOutputStream
org.backsource.utils.io.DOMOutputStream
Write to a DOM Document.
Much like a FileOutputStream writes the stream to a File this class writes the stream directly to a DOM tree. This is however done with the use of two threads; so this class should probably not be used in EJB:s. When the writing is finished it is possible to get the Document with getDocument().
| Constructor Summary | |
DOMOutputStream()
|
|
| Method Summary | |
void |
close()
Close the stream. |
org.w3c.dom.Document |
getDocument()
Get the document written to, if the stream was not closed before this methods was called it will be closed by it. |
protected void |
startDOMReader()
Start the DOM reader thread. |
void |
write(byte[] b,
int off,
int len)
Write to the DOM tree, if its the first write start the DOM reader. |
void |
write(int b)
Write to the DOM tree, if its the first write start the DOM reader. |
| Methods inherited from class java.io.PipedOutputStream |
connect, flush |
| Methods inherited from class java.io.OutputStream |
write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DOMOutputStream()
| Method Detail |
public void write(int b)
throws java.io.IOException
java.io.IOException
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOException
protected void startDOMReader()
throws java.io.IOException
java.io.IOException
public org.w3c.dom.Document getDocument()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
The stream will be flushed and the wait for the DOM reader to finish. Any exceptions thrown in the reader thread will also be reported.
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||