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:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
public final class UncheckedBufferedReader extends java.io.BufferedReader
ABufferedReader
that throwsUncheckedIOException
instead ofIOException
.To build an instance, see
UncheckedBufferedReader.Builder
.- Since:
- 2.12.0
- See Also:
BufferedReader
,IOException
,UncheckedIOException
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UncheckedBufferedReader.Builder
Builds a newUncheckedBufferedReader
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UncheckedBufferedReader.Builder
builder()
Constructs a newUncheckedBufferedReader.Builder
.void
close()
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
mark(int readAheadLimit)
Calls this method's super and rethrowIOException
asUncheckedIOException
.int
read()
Calls this method's super and rethrowIOException
asUncheckedIOException
.int
read(char[] cbuf)
Calls this method's super and rethrowIOException
asUncheckedIOException
.int
read(char[] cbuf, int off, int len)
Calls this method's super and rethrowIOException
asUncheckedIOException
.int
read(java.nio.CharBuffer target)
Calls this method's super and rethrowIOException
asUncheckedIOException
.java.lang.String
readLine()
Calls this method's super and rethrowIOException
asUncheckedIOException
.boolean
ready()
Calls this method's super and rethrowIOException
asUncheckedIOException
.void
reset()
Calls this method's super and rethrowIOException
asUncheckedIOException
.long
skip(long n)
Calls this method's super and rethrowIOException
asUncheckedIOException
.
-
-
-
Method Detail
-
builder
public static UncheckedBufferedReader.Builder builder()
Constructs a newUncheckedBufferedReader.Builder
.- Returns:
- a new
UncheckedBufferedReader.Builder
.
-
close
public void close() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
mark
public void mark(int readAheadLimit) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
mark
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
read
public int read() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
read
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
read
public int read(char[] cbuf) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
read
in classjava.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 rethrowIOException
asUncheckedIOException
.- Overrides:
read
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
read
public int read(java.nio.CharBuffer target) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Specified by:
read
in interfacejava.lang.Readable
- Overrides:
read
in classjava.io.Reader
- Throws:
java.io.UncheckedIOException
-
readLine
public java.lang.String readLine() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
readLine
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
ready
public boolean ready() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
ready
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
reset
public void reset() throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
reset
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
skip
public long skip(long n) throws java.io.UncheckedIOException
Calls this method's super and rethrowIOException
asUncheckedIOException
.- Overrides:
skip
in classjava.io.BufferedReader
- Throws:
java.io.UncheckedIOException
-
-