Package owl.util

## Class GuardedStream

- java.lang.Object
- - owl.util.GuardedStream

-     public final class GuardedStream
      extends Object

  Wrappers for streams which only forward a `OutputStream.flush()` upon `OutputStream.close()`. This is useful in combination with, e.g., `System.out`, since upon calling close on that stream, nothing can be written to console anymore.

  Warning: Code using these writers should still use try-with-resource guards or similar, as otherwise the output may not get flushed.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Writer` | `syserr` |
    `static OutputStream` | `sysout` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static OutputStream` | `guard​(OutputStream stream)` |
    `static Writer` | `guard​(Writer writer)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### syserr

          public static final Writer syserr

    - #### sysout

          public static final OutputStream sysout

  - ### Method Detail

    - #### guard

          public static Writer guard​(Writer writer)

    - #### guard

          public static OutputStream guard​(OutputStream stream)