Class UncheckedBufferedReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable

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

    To build an instance, see UncheckedBufferedReader.Builder.

    Since:
    2.12.0
    See Also:
    BufferedReader, IOException, UncheckedIOException
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static UncheckedBufferedReader.Builder 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​(java.nio.CharBuffer target)
      Calls this method's super and rethrow IOException as UncheckedIOException.
      java.lang.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.io.Reader

        nullReader, transferTo
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • close

        public void close()
                   throws java.io.UncheckedIOException
        Calls this method's super and rethrow IOException as UncheckedIOException.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.BufferedReader
        Throws:
        java.io.UncheckedIOException
      • mark

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

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

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

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

        public int read​(java.nio.CharBuffer target)
                 throws java.io.UncheckedIOException
        Calls this method's super and rethrow IOException as UncheckedIOException.
        Specified by:
        read in interface java.lang.Readable
        Overrides:
        read in class java.io.Reader
        Throws:
        java.io.UncheckedIOException
      • readLine

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

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

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

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