de.intarsys.tools.stream
Class LogOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by de.intarsys.tools.stream.LogOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class LogOutputStream
extends java.io.FilterOutputStream

An output stream that logs any char written.

The output stream is piped in the writing process, any characters written are copied to an associated output stream object.

 Client -> LogOutputStream -> OutputStream -> Destination
            |
            v
           OutputStream (Copy)
 


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
LogOutputStream(java.io.OutputStream newout, java.io.OutputStream newlog)
          SplitStream - Konstruktorkommentar.
 
Method Summary
 void close()
           
 void flush()
           
 java.io.OutputStream getLog()
           
 void setLog(java.io.OutputStream newLog)
           
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogOutputStream

public LogOutputStream(java.io.OutputStream newout,
                       java.io.OutputStream newlog)
SplitStream - Konstruktorkommentar.

Parameters:
newout -
newlog -
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.FilterOutputStream
Throws:
java.io.IOException

getLog

public java.io.OutputStream getLog()

setLog

public void setLog(java.io.OutputStream newLog)

write

public void write(int b)
           throws java.io.IOException
Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException