FileDocCategorySizeDatePackage
CountingQuietWriter.javaAPI DocApache log4j 1.2.151612Sat Aug 25 00:09:40 BST 2007org.apache.log4j.helpers

CountingQuietWriter

public class CountingQuietWriter extends QuietWriter
Counts the number of bytes written.
author
Heinz Richter, heinz.richter@frogdot.com
since
0.8.1

Fields Summary
protected long
count
Constructors Summary
public CountingQuietWriter(Writer writer, ErrorHandler eh)

    super(writer, eh);
  
Methods Summary
public longgetCount()

    return count;
  
public voidsetCount(long count)

    this.count = count;
  
public voidwrite(java.lang.String string)

    try {
      out.write(string);
      count += string.length();
    }
    catch(IOException e) {
      errorHandler.error("Write failure.", e, ErrorCode.WRITE_FAILURE);
    }