ch.elca.el4j.util.socketstatistics
Class InputStreamLogger
java.lang.Object
java.io.InputStream
ch.elca.el4j.util.socketstatistics.InputStreamLogger
- All Implemented Interfaces:
- Closeable
public class InputStreamLogger
- extends InputStream
Implementation of InputStream with modification for logging.
- Author:
- Jonas Hauenstein (JHN)
- File-location:
- InputStreamLogger
- Last check-in date:
- 2009-09-25 16:38:41 +0200 (Fr, 25. Sep 2009) by jonasha for revision 3929
Method Summary |
int |
read()
Modified version of read which also logs traffic to assigned ConnectionStatistics. |
int |
read(byte[] b,
int off,
int len)
Modified version of read which also logs traffic to assigned ConnectionStatistics. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamLogger
public InputStreamLogger(InputStream is,
ConnectionStatistics cs)
- Constructor.
- Parameters:
is
- original InputStream used for readingcs
- ConnectionStatistics used for logging
read
public int read()
throws IOException
- Modified version of read which also logs traffic to assigned ConnectionStatistics.
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Modified version of read which also logs traffic to assigned ConnectionStatistics.
- Overrides:
read
in class InputStream
- Throws:
IOException
Copyright © 2005-2011 ELCA. All Rights Reserved.