Package: grails.io.support

## [Groovy] Class SystemOutErrCapturer

- grails.io.support.SystemOutErrCapturer

-     @groovy.transform.CompileStatic
      class SystemOutErrCapturer
      extends java.lang.Object

  Utility for capturing the result of calls to System.out / System.err

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `SystemOutErrCapturer.NullOutputStream` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.io.ByteArrayOutputStream` | `err` |
    `private java.io.ByteArrayOutputStream` | `out` |
    `private SystemStreamsRedirector` | `previousState` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.io.ByteArrayOutputStream` | `err`
    `java.io.ByteArrayOutputStream` | `out`
    `SystemStreamsRedirector` | `previousState`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SystemOutErrCapturer ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `SystemOutErrCapturer` | `capture()`
    `` | `void` | `close()`
    `` | `SystemOutErrCapturer` | `redirectToNull()`
    `<T>` | `static T` | `withCapturedOutput(groovy.lang.Closure<T> closure)`
    `<T>` | `static T` | `withNullOutput(groovy.lang.Closure<T> closure)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private java.io.ByteArrayOutputStream err

    - #### private java.io.ByteArrayOutputStream out

    - #### private SystemStreamsRedirector previousState

  - ### Property Detail

    - #### java.io.ByteArrayOutputStream err

    - #### java.io.ByteArrayOutputStream out

    - #### SystemStreamsRedirector previousState

  - ### Constructor Detail

    - #### SystemOutErrCapturer()

  - ### Method Detail

    - #### SystemOutErrCapturer capture()

    - #### void close()

    - #### SystemOutErrCapturer redirectToNull()

    - #### <T> static T withCapturedOutput(groovy.lang.Closure<T> closure)

    - #### <T> static T withNullOutput(groovy.lang.Closure<T> closure)