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 |
protected PrintStream out
protected PrintStream err
public HideOutput()
restoreOutput()
is called by setting them to this OutputStreamCopyright © 2012–2013 The Apache Software Foundation. All rights reserved.