LoggingOutputStreampublic class LoggingOutputStream extends FilterOutputStream
Fields Summary |
---|
private Recorder | _recorder |
Constructors Summary |
---|
public LoggingOutputStream(OutputStream outputStream, String fileName)
this (outputStream, new Recorder(fileName));
| public LoggingOutputStream(OutputStream outputStream, Recorder recorder)
super (outputStream);
_recorder = recorder;
|
Methods Summary |
---|
public void | write(int b)
_recorder.incrementCounter(1);
super.write(b);
| public void | write(byte[] b)
super.write(b);
_recorder.incrementCounter(b.length);
| public void | write(byte[] b, int off, int len)
super.write(b, off, len);
_recorder.incrementCounter(len);
|
|