Class RSystemOut

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class RSystemOut extends PrintStream
Delegates the print stream output from System.out to a per-thread set of ByteArrayPrintStreams keyed on thread id. This intercepts any write to System.out and first of all picks a concurrent map of print streams keyed by thread Id. This is possibly quite a lot slower than the default. This is like it is so that later on the RFuture class can asynchronously find out what console output has been gathered so far for a given thread without being in that thread. This lets system.out be called by a long running method in a thread and the output be available in the RFuture monitor thread.
  • Method Details

    • checkError

      public boolean checkError()
      Overrides:
      checkError in class PrintStream
    • write

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

      public void write(int b)
      Overrides:
      write in class PrintStream
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class PrintStream
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class PrintStream
    • getSystemMessages

      public static String getSystemMessages(long id)
    • getSystemMessages

      public static String getSystemMessages()
    • setup

      public static void setup()
    • release

      public static void release()