|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Writer
ti.io.TeeWriter
public class TeeWriter
This is a writer that can split what is written to it to two different output Writers.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
TeeWriter(java.io.Writer w1,
java.io.Writer w2)
Class Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Close both the output writers. |
void |
flush()
Flush both the output writers. |
void |
setPrimaryWriter(java.io.Writer w1)
Set the primary output writer. |
void |
setSecondaryWriter(java.io.Writer w2)
Set the secondary output writer. |
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TeeWriter(java.io.Writer w1,
java.io.Writer w2)
w1 - the first of the two output writersw2 - the second of the two output writers| Method Detail |
|---|
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writercbuf - Array of charactersoff - Offset from which to start writing characterslen - Number of characters to write
java.io.IOException - If an I/O error occurs
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOException - - If an I/O error occurs
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Writerjava.io.IOException - - If an I/O error occurspublic void setPrimaryWriter(java.io.Writer w1)
w1 - the first of the two output writerspublic void setSecondaryWriter(java.io.Writer w2)
w2 - the second of the two output writers
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||