Package org.apache.commons.io.output

# Class UncheckedFilterWriter

java.lang.Object
java.io.Writer
java.io.FilterWriter
org.apache.commons.io.output.UncheckedFilterWriter

All Implemented Interfaces:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

public final class UncheckedFilterWriter extends FilterWriter
A `FilterWriter` that throws `UncheckedIOException` instead of `IOException`.

To build an instance, use `UncheckedFilterWriter.Builder`.

Since:
  2.12.0
See Also:
  - `UncheckedFilterWriter.Builder`
  - `FilterWriter`
  - `IOException`
  - `UncheckedIOException`

- ## Nested Class Summary

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

- ## Field Summary

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

  `out`

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

  `lock`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Writer`
  `append(char c)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `Writer`
  `append(CharSequence csq)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `Writer`
  `append(CharSequence csq, int start, int end)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `static UncheckedFilterWriter.Builder`
  `builder()`
  Constructs a new `UncheckedFilterWriter.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(char[] cbuf)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `void`
  `write(char[] cbuf, int off, int len)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `void`
  `write(int c)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `void`
  `write(String str)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `void`
  `write(String str, int off, int len)`
  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 UncheckedFilterWriter.Builder builder()
    Constructs a new `UncheckedFilterWriter.Builder`.
    Returns:
      a new `UncheckedFilterWriter.Builder`.

  - ### append

    public Writer append(char c) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Specified by:
      `append` in interface `Appendable`
    Overrides:
      `append` in class `Writer`
    Throws:
      `UncheckedIOException`

  - ### append

    public Writer append(CharSequence csq) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Specified by:
      `append` in interface `Appendable`
    Overrides:
      `append` in class `Writer`
    Throws:
      `UncheckedIOException`

  - ### append

    public Writer append(CharSequence csq, int start, int end) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Specified by:
      `append` in interface `Appendable`
    Overrides:
      `append` in class `Writer`
    Throws:
      `UncheckedIOException`

  - ### 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 `FilterWriter`
    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 `FilterWriter`
    Throws:
      `UncheckedIOException`

  - ### write

    public void write(char[] cbuf) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `write` in class `Writer`
    Throws:
      `UncheckedIOException`

  - ### write

    public void write(char[] cbuf, int off, int len) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `write` in class `FilterWriter`
    Throws:
      `UncheckedIOException`

  - ### write

    public void write(int c) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `write` in class `FilterWriter`
    Throws:
      `UncheckedIOException`

  - ### write

    public void write(String str) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `write` in class `Writer`
    Throws:
      `UncheckedIOException`

  - ### write

    public void write(String str, int off, int len) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `write` in class `FilterWriter`
    Throws:
      `UncheckedIOException`