Class OutputLogger.OutputPrintStream

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
Enclosing class:
OutputLogger

public static class OutputLogger.OutputPrintStream extends PrintStream
A print stream class to capture all data from stdout and stderr.
Version:
$Revision: 4716 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
  • Constructor Details

    • OutputPrintStream

      public OutputPrintStream(OutputLogger owner, PrintStream stream) throws Exception
      Default constructor.
      Parameters:
      owner - the owning logger
      stream - the stream
      Throws:
      Exception - if something goes wrong
  • Method Details

    • flush

      public void flush()
      ignored.
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class PrintStream
    • print

      public void print(int x)
      prints the given int to the streams.
      Overrides:
      print in class PrintStream
      Parameters:
      x - the object to print
    • print

      public void print(boolean x)
      prints the given boolean to the streams.
      Overrides:
      print in class PrintStream
      Parameters:
      x - the object to print
    • print

      public void print(String x)
      prints the given string to the streams.
      Overrides:
      print in class PrintStream
      Parameters:
      x - the object to print
    • print

      public void print(Object x)
      prints the given object to the streams.
      Overrides:
      print in class PrintStream
      Parameters:
      x - the object to print
    • println

      public void println()
      prints a new line to the streams.
      Overrides:
      println in class PrintStream
    • println

      public void println(int x)
      prints the given int to the streams.
      Overrides:
      println in class PrintStream
      Parameters:
      x - the object to print
    • println

      public void println(boolean x)
      prints the given boolean to the streams.
      Overrides:
      println in class PrintStream
      Parameters:
      x - the object to print
    • println

      public void println(String x)
      prints the given string to the streams.
      Overrides:
      println in class PrintStream
      Parameters:
      x - the object to print
    • println

      public void println(Object x)
      prints the given object to the streams (for Throwables we print the stack trace).
      Overrides:
      println in class PrintStream
      Parameters:
      x - the object to print