Package de.intarsys.tools.writer
Class LogWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
de.intarsys.tools.writer.LogWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
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)
-
Field Summary
Fields inherited from class java.io.FilterWriter
out -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LogWriter
EscapeWriter constructor comment.- Parameters:
o- java.io.Writerlog-
-
-
Method Details
-
close
Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterWriter- Throws:
IOException- If an I/O error occurs
-
flush
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterWriter- Throws:
IOException- If an I/O error occurs
-
getLog
-
write
- Overrides:
writein classFilterWriter- Throws:
IOException
-
write
- Overrides:
writein classFilterWriter- Throws:
IOException
-
write
- Overrides:
writein classFilterWriter- Throws:
IOException
-