|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.FilterWriter
de.infinityloop.util.inout.YWayWriter
public class YWayWriter
This class provides a Y-Way splitter for a Writer, i.e. the incoming data is output to the default Writer as well as it is duplicated to a settable, second Writer, effectively cloning incoming data sent to this single Writer into two Writers.
Field Summary |
---|
Fields inherited from class java.io.FilterWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
YWayWriter(java.io.Writer out)
Constructor specifying only the underlying ouput stream. |
|
YWayWriter(java.io.Writer out,
java.io.Writer yway)
Constructor specifying the underlying ouput stream and the output stream where incoming data should also be written to. |
Method Summary | |
---|---|
void |
close()
Overrides the corresponding inherited method in FilterWriter. |
void |
flush()
Overrides the corresponding inherited method in FilterWriter. |
void |
write(char[] cbuf,
int off,
int len)
Overrides the corresponding inherited method in FilterWriter. |
void |
write(int c)
Overrides the corresponding inherited method in FilterWriter. |
void |
write(java.lang.String str,
int off,
int len)
Overrides the corresponding inherited method in FilterWriter. |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public YWayWriter(java.io.Writer out)
public YWayWriter(java.io.Writer out, java.io.Writer yway)
Method Detail |
---|
public void write(int c) throws java.io.IOException
write
in class java.io.FilterWriter
java.io.IOException
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.FilterWriter
java.io.IOException
public void write(java.lang.String str, int off, int len) throws java.io.IOException
write
in class java.io.FilterWriter
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterWriter
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterWriter
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |