@CompileStatic class SystemOutErrCapturer extends Object
Utility for capturing the result of calls to System.out / System.err
Modifiers | Name | Description |
---|---|---|
static class |
SystemOutErrCapturer.NullOutputStream |
Type | Name and description |
---|---|
ByteArrayOutputStream |
err |
ByteArrayOutputStream |
out |
SystemStreamsRedirector |
previousState |
Constructor and description |
---|
SystemOutErrCapturer() |
Type Params | Return Type | Name and description |
---|---|---|
|
SystemOutErrCapturer |
capture() |
|
void |
close() |
|
SystemOutErrCapturer |
redirectToNull() |
<T> |
static T |
withCapturedOutput(Closure<T> closure) |
<T> |
static T |
withNullOutput(Closure<T> closure) |