public class OutputStreamInterceptor extends OutputStream
JTextArea.| Modifier and Type | Field and Description |
|---|---|
private boolean |
console
A flag, whether or not the output should be copied to the standard
System.out too. |
private PrintStream |
stdOut
The standard
PrintStream of the System. |
private JTextArea |
textArea
A
JTextArea where the output is copied to. |
| Constructor and Description |
|---|
OutputStreamInterceptor(JTextArea textArea,
PrintStream stdOut,
boolean console)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(int b) |
close, flush, write, writeprivate boolean console
System.out too.private PrintStream stdOut
PrintStream of the System.public OutputStreamInterceptor(JTextArea textArea, PrintStream stdOut, boolean console)
textArea - a JTextArea where the output is redirected/copied to.stdOut - the standard PrintStream of Systemconsole - whether or not the system's output should be also printed to
the consolepublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.