FileDocCategorySizeDatePackage
LoggingOutputStream.javaAPI DocExample896Thu Nov 08 00:22:32 GMT 2001com.ora.rmibook.chapter1

LoggingOutputStream

public 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 voidwrite(int b)

        _recorder.incrementCounter(1);
        super.write(b);
    
public voidwrite(byte[] b)

        super.write(b);
        _recorder.incrementCounter(b.length);
    
public voidwrite(byte[] b, int off, int len)

        super.write(b, off, len);
        _recorder.incrementCounter(len);