Class AppLog.TeeStream

java.lang.Object
java.io.OutputStream
org.emrick.project.dev.AppLog.TeeStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Enclosing class:
AppLog

private static class AppLog.TeeStream extends OutputStream
Passes bytes through to the original stream and collects them into lines for the log.
  • Field Details

  • Constructor Details

    • TeeStream

      TeeStream(PrintStream original, boolean error)
  • Method Details

    • write

      public void write(int b)
      Specified by:
      write in class OutputStream
    • write

      public void write(byte[] buf, int off, int len)
      Overrides:
      write in class OutputStream
    • collect

      private void collect(int b)
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
    • flushLine

      private void flushLine()