|
intarsys runtime library | |||||||||
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.intarsys.tools.writer.LogWriter
public class LogWriter
A writer that logs any char written.
The writer is piped in the writing process, any characters written are copied to an associated writer object.
Client -> LogWriter -> Writer -> Destination | v Writer (Copy)
Constructor Summary | |
---|---|
LogWriter(Writer o,
Writer log)
EscapeWriter constructor comment. |
Method Summary | |
---|---|
void |
close()
Close the stream, flushing it first. |
void |
flush()
Flush the stream. |
Writer |
getLog()
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(String str,
int off,
int len)
|
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogWriter(Writer o, Writer log)
o
- java.io.Writerlog
- Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
close
in class FilterWriter
IOException
- If an I/O error occurspublic void flush() throws IOException
flush
in interface Flushable
flush
in class FilterWriter
IOException
- If an I/O error occurspublic Writer getLog()
public void write(char[] cbuf, int off, int len) throws IOException
write
in class FilterWriter
IOException
public void write(int c) throws IOException
write
in class FilterWriter
IOException
public void write(String str, int off, int len) throws IOException
write
in class FilterWriter
IOException
|
intarsys runtime library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |