Package 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, use `UncheckedFilterOutputStream.Builder`.

Since:
  2.12.0
See Also:
  - `UncheckedFilterOutputStream.Builder`
  - `FilterOutputStream`
  - `UncheckedIOException`

- ## Nested Class Summary

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

- ## Field Summary

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

  `out`

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### 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 `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    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`