public class PrintStreamHandler extends java.lang.Object implements InvocationOutputHandler
System.out
.Modifier and Type | Field and Description |
---|---|
private boolean |
alwaysFlush
A flag whether the print stream should be flushed after each line.
|
private java.io.PrintStream |
out
The print stream to write to, never
null . |
Constructor and Description |
---|
PrintStreamHandler()
Creates a new output handler that writes to
System.out . |
PrintStreamHandler(java.io.PrintStream out,
boolean alwaysFlush)
Creates a new output handler that writes to the specified print stream.
|
Modifier and Type | Method and Description |
---|---|
void |
consumeLine(java.lang.String line) |
private java.io.PrintStream out
null
.private boolean alwaysFlush
public PrintStreamHandler()
System.out
.public PrintStreamHandler(java.io.PrintStream out, boolean alwaysFlush)
out
- The print stream to write to, must not be null
.alwaysFlush
- A flag whether the print stream should be flushed after each line.