Package org.apache.commons.io.input

# Class UncheckedBufferedReader

java.lang.Object
java.io.Reader
java.io.BufferedReader
org.apache.commons.io.input.UncheckedBufferedReader

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `Readable`

public final class UncheckedBufferedReader extends BufferedReader
A `BufferedReader` that throws `UncheckedIOException` instead of `IOException`.

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

Since:
  2.12.0
See Also:
  - `UncheckedBufferedReader.Builder`
  - `BufferedReader`
  - `IOException`
  - `UncheckedIOException`

- ## Nested Class Summary

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

- ## Field Summary

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

  `lock`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static UncheckedBufferedReader.Builder`
  `builder()`
  Constructs a new `UncheckedBufferedReader.Builder`.
  `void`
  `close()`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `void`
  `mark(int readAheadLimit)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `int`
  `read()`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `int`
  `read(char[] cbuf)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `int`
  `read(char[] cbuf, int off, int len)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `int`
  `read(CharBuffer target)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `String`
  `readLine()`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `boolean`
  `ready()`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `void`
  `reset()`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
  `long`
  `skip(long n)`
  Calls this method's super and rethrow `IOException` as `UncheckedIOException`.

  ### Methods inherited from class java.io.BufferedReader

  `lines, markSupported`

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

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

- ## Method Details

  - ### builder

    public static UncheckedBufferedReader.Builder builder()
    Constructs a new `UncheckedBufferedReader.Builder`.
    Returns:
      a new `UncheckedBufferedReader.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 `BufferedReader`
    Throws:
      `UncheckedIOException`

  - ### mark

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

  - ### read

    public int read() throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `read` in class `BufferedReader`
    Throws:
      `UncheckedIOException`

  - ### read

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

  - ### read

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

  - ### read

    public int read(CharBuffer target) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Specified by:
      `read` in interface `Readable`
    Overrides:
      `read` in class `Reader`
    Throws:
      `UncheckedIOException`

  - ### readLine

    public String readLine() throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `readLine` in class `BufferedReader`
    Throws:
      `UncheckedIOException`

  - ### ready

    public boolean ready() throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `ready` in class `BufferedReader`
    Throws:
      `UncheckedIOException`

  - ### reset

    public void reset() throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `reset` in class `BufferedReader`
    Throws:
      `UncheckedIOException`

  - ### skip

    public long skip(long n) throws UncheckedIOException
    Calls this method's super and rethrow `IOException` as `UncheckedIOException`.
    Overrides:
      `skip` in class `BufferedReader`
    Throws:
      `UncheckedIOException`