Package slash.common.log
Class LoggingOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
slash.common.log.LoggingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An OutputStream that writes contents to a Logger upon each call to
flush().
Based on http://blogs.sun.com/nickstephen/entry/java_redirecting_system_out_and
- Author:
- Christian Pesch
-
Field Summary
Fields inherited from class java.io.ByteArrayOutputStream
buf, count -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeToMethods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
LoggingOutputStream
-
-
Method Details
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-