org.apache.commons.io.output

## Class UncheckedFilterOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - java.io.FilterOutputStream
    - - org.apache.commons.io.output.UncheckedFilterOutputStream

- All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

      public final class UncheckedFilterOutputStream
      extends FilterOutputStream

  A `FilterOutputStream` that throws `UncheckedIOException` instead of `UncheckedIOException`.

  To build an instance, see `UncheckedFilterOutputStream.Builder`.

  Since:
    2.12.0
  See Also:
    `FilterOutputStream`, `UncheckedIOException`, `UncheckedIOException`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `UncheckedFilterOutputStream.Builder` Builds a new `UncheckedFilterOutputStream` instance.

  - ### Field Summary

    - ### Fields inherited from class java.io.FilterOutputStream

      `out`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UncheckedFilterOutputStream.Builder` | `builder()` Constructs a new `UncheckedFilterOutputStream.Builder`.
    `void` | `close()` Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    `void` | `flush()` Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    `void` | `write(byte[] b)` Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    `void` | `write(byte[] b, int off, int len)` Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    `void` | `write(int b)` Calls this method's super and rethrow `IOException` as `UncheckedIOException`.

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

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

- - ### Method Detail

    - #### builder

          public static UncheckedFilterOutputStream.Builder builder()

      Constructs a new `UncheckedFilterOutputStream.Builder`.
      Returns:
        a new `UncheckedFilterOutputStream.Builder`.

    - #### close

          public void close()
                     throws UncheckedIOException

      Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `FilterOutputStream`
      Throws:
        `UncheckedIOException`

    - #### flush

          public void flush()
                     throws UncheckedIOException

      Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
      Specified by:
        `flush` in interface `Flushable`
      Overrides:
        `flush` in class `FilterOutputStream`
      Throws:
        `UncheckedIOException`

    - #### write

          public void write(byte[] b)
                     throws UncheckedIOException

      Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
      Overrides:
        `write` in class `FilterOutputStream`
      Throws:
        `UncheckedIOException`

    - #### write

          public void write(byte[] b,
                            int off,
                            int len)
                     throws UncheckedIOException

      Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
      Overrides:
        `write` in class `FilterOutputStream`
      Throws:
        `UncheckedIOException`

    - #### write

          public void write(int b)
                     throws UncheckedIOException

      Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
      Overrides:
        `write` in class `FilterOutputStream`
      Throws:
        `UncheckedIOException`

Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.