public class HideOutput extends Object
restoreOutput()
after the noisy code.
Intended usage:
HideOutput hider = new HideOutput();
try {
... noisy code ...
} finally {
hider.restoreOutput();
}
Modifier and Type | Field and Description |
---|---|
protected PrintStream |
err |
protected PrintStream |
out |
Constructor and Description |
---|
HideOutput()
calling this constructor will silence System.out and System.err until
restoreOutput()
is called by setting them to this OutputStream |
Modifier and Type | Method and Description |
---|---|
void |
restoreOutput()
this method restores System.out and System.err
|
protected PrintStream out
protected PrintStream err
public HideOutput()
restoreOutput()
is called by setting them to this OutputStreamCopyright © 2012–2022 The Apache Software Foundation. All rights reserved.