ch.elca.el4j.util.socketstatistics
Class OutputStreamLogger

java.lang.Object
  extended by java.io.OutputStream
      extended by ch.elca.el4j.util.socketstatistics.OutputStreamLogger
All Implemented Interfaces:
Closeable, Flushable

public class OutputStreamLogger
extends OutputStream

Implementation of OutputStream with modification for logging.

Author:
Jonas Hauenstein (JHN)
File-location:
OutputStreamLogger
Last check-in date:
2009-09-25 16:38:41 +0200 (Fr, 25. Sep 2009) by jonasha for revision 3929

Constructor Summary
OutputStreamLogger(OutputStream os, ConnectionStatistics cs)
          Constructor.
 
Method Summary
 void write(byte[] b, int off, int length)
          Modified version of write which also logs traffic to assigned ConnectionStatistics.
 void write(int b)
          Modified version of write which also logs traffic to assigned ConnectionStatistics.
 
Methods inherited from class java.io.OutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputStreamLogger

public OutputStreamLogger(OutputStream os,
                          ConnectionStatistics cs)
Constructor.

Parameters:
os - original OutputStream used for writing
cs - ConnectionStatistics used for logging
Method Detail

write

public void write(int b)
           throws IOException
Modified version of write which also logs traffic to assigned ConnectionStatistics.

Specified by:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int length)
           throws IOException
Modified version of write which also logs traffic to assigned ConnectionStatistics.

Overrides:
write in class OutputStream
Throws:
IOException


Copyright © 2005-2011 ELCA. All Rights Reserved.