public abstract class UnsynchronizedReader extends Reader
Reader without any of the superclass' synchronization.| Constructor and Description |
|---|
UnsynchronizedReader()
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkOpen()
Checks if this instance is closed and throws an IOException if so.
|
void |
close() |
boolean |
isClosed()
Tests whether this instance is closed; if
close() completed successfully. |
void |
setClosed(boolean closed)
Sets whether this instance is closed.
|
long |
skip(long n)
Skips characters by reading from this instance.
|
void checkOpen()
throws IOException
IOException - if this instance is closed.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic boolean isClosed()
close() completed successfully.public void setClosed(boolean closed)
closed - whether this instance is closed.public long skip(long n)
throws IOException
skip in class Readern - The number of characters to skip.IllegalArgumentException - If n is negative.IOException - If an I/O error occurs.