|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream org.sadun.util.TieOutputStream
An OutputStream which ties output to two underlying streams. Any character written to the stream is replicated on both.
Constructor Summary | |
TieOutputStream(java.io.OutputStream os1,
java.io.OutputStream os2)
Build a OutputStream that ties togheter the two given streams. |
Method Summary | |
void |
close()
Close both underlying streams |
void |
flush()
Flush both underlying streams |
java.io.OutputStream |
getFirstWriter()
Return the first of the two tied writers |
java.io.OutputStream |
getSecondWriter()
Return the second of the two tied writers |
void |
write(int b)
Write a byte to the stream, and thus to the two underlying streams. |
Methods inherited from class java.io.OutputStream |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TieOutputStream(java.io.OutputStream os1, java.io.OutputStream os2)
os1
- the first streamos2
- the second streamMethod Detail |
public void write(int b) throws java.io.IOException
b
- the byte to write
java.io.IOException
- if something fails during writingpublic void close() throws java.io.IOException
java.io.IOException
- if something fails during closingpublic void flush() throws java.io.IOException
java.io.IOException
- if something fails during flushingpublic java.io.OutputStream getFirstWriter()
public java.io.OutputStream getSecondWriter()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |