|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.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 stream| Method Detail |
public void write(int b)
throws java.io.IOException
b - the byte to write
java.io.IOException - if something fails during writing
public void close()
throws java.io.IOException
java.io.IOException - if something fails during closing
public 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 | ||||||||||