Package org.apache.commons.io.input
Class UnsynchronizedReader
java.lang.Object
java.io.Reader
org.apache.commons.io.input.UnsynchronizedReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
- Direct Known Subclasses:
UnsynchronizedBufferedReader
A
Reader
without any of the superclass' synchronization.- Since:
- 2.17.0
-
Constructor Details
-
UnsynchronizedReader
public UnsynchronizedReader()
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-
isClosed
Tests whether this instance is closed; ifclose()
completed successfully.- Returns:
- whether this instance is closed.
-
setClosed
Sets whether this instance is closed.- Parameters:
closed
- whether this instance is closed.
-
skip
Skips characters by reading from this instance. This method will block until:- some characters are available,
- an I/O error occurs, or
- the end of the stream is reached.
- Overrides:
skip
in classReader
- Parameters:
n
- The number of characters to skip.- Returns:
- The number of characters actually skipped.
- Throws:
IllegalArgumentException
- Ifn
is negative.IOException
- If an I/O error occurs.
-