Class UncheckedFilterInputStream

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

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

    To build an instance, use UncheckedFilterInputStream.Builder.

    Since:
    2.12.0
    See Also:
    UncheckedFilterInputStream.Builder, BufferedReader, IOException, UncheckedIOException
    • Constructor Detail

      • UncheckedFilterInputStream

        private UncheckedFilterInputStream​(UncheckedFilterInputStream.Builder builder)
                                    throws java.io.IOException
        Parameters:
        builder - A builder providing the underlying input stream.
        Throws:
        java.io.IOException - if an I/O error occurs.
    • Method Detail

      • available

        public int available()
                      throws java.io.UncheckedIOException
        Calls this method's super and rethrow IOException as UncheckedIOException.
        Overrides:
        available in class java.io.FilterInputStream
        Throws:
        java.io.UncheckedIOException
      • 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.FilterInputStream
        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.FilterInputStream
        Throws:
        java.io.UncheckedIOException
      • read

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

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.UncheckedIOException
        Calls this method's super and rethrow IOException as UncheckedIOException.
        Overrides:
        read in class java.io.FilterInputStream
        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.FilterInputStream
        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.FilterInputStream
        Throws:
        java.io.UncheckedIOException