Class CountingOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.eclnt.util.stream.CountingOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class CountingOutputStream extends FilterOutputStream
  • Constructor Details

    • CountingOutputStream

      public CountingOutputStream(OutputStream out)
      Parameters:
      out - Original output stream that is used for writing the data
    • CountingOutputStream

      public CountingOutputStream(OutputStream out, Runnable runBeforeFirstWrite)
      Parameters:
      out - Original output stream that is used for writing the data
      runBeforeFirstWrite - Action that is executed before the first value is written
  • Method Details