Package uk.co.terminological.rjava
Class RSystemOut
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
uk.co.terminological.rjava.RSystemOut
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
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.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Method Summary
Methods inherited from class java.io.PrintStream
append, append, append, clearError, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, writeBytes
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Method Details
-
checkError
public boolean checkError()- Overrides:
checkError
in classPrintStream
-
write
public void write(byte[] buf, int off, int len) - Overrides:
write
in classPrintStream
-
write
public void write(int b) - Overrides:
write
in classPrintStream
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classPrintStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPrintStream
-
getSystemMessages
-
getSystemMessages
-
setup
public static void setup() -
release
public static void release()
-