intarsys runtime library

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:
Closeable, Flushable

public class LogOutputStream
extends 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)
 


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

Constructor Detail

LogOutputStream

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

Parameters:
newout -
newlog -
Method Detail

close

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

flush

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

getLog

public OutputStream getLog()

setLog

public void setLog(OutputStream newLog)

write

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

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.