Methods Summary |
---|
public void | close()Closes this reader. This implementation closes the filtered reader.
synchronized (lock) {
in.close();
}
|
public synchronized void | mark(int readlimit)Sets a mark position in this reader. The parameter {@code readlimit}
indicates how many bytes can be read before the mark is invalidated.
Sending {@code reset()} will reposition this reader back to the marked
position, provided that {@code readlimit} has not been surpassed.
This implementation sets a mark in the filtered reader.
synchronized (lock) {
in.mark(readlimit);
}
|
public boolean | markSupported()Indicates whether this reader supports {@code mark()} and {@code reset()}.
This implementation returns whether the filtered reader supports marking.
synchronized (lock) {
return in.markSupported();
}
|
public int | read()Reads a single character from the filtered reader and returns it as an
integer with the two higher-order bytes set to 0. Returns -1 if the end
of the filtered reader has been reached.
synchronized (lock) {
return in.read();
}
|
public int | read(char[] buffer, int offset, int count)Reads at most {@code count} characters from the filtered reader and stores them
in the byte array {@code buffer} starting at {@code offset}. Returns the
number of characters actually read or -1 if no characters were read and
the end of the filtered reader was encountered.
synchronized (lock) {
return in.read(buffer, offset, count);
}
|
public boolean | ready()Indicates whether this reader is ready to be read without blocking. If
the result is {@code true}, the next {@code read()} will not block. If
the result is {@code false}, this reader may or may not block when
{@code read()} is sent.
synchronized (lock) {
return in.ready();
}
|
public void | reset()Resets this reader's position to the last marked location. Invocations of
{@code read()} and {@code skip()} will occur from this new location. If
this reader was not marked, the behavior depends on the implementation of
{@code reset()} in the Reader subclass that is filtered by this reader.
The default behavior for Reader is to throw an {@code IOException}.
synchronized (lock) {
in.reset();
}
|
public long | skip(long count)Skips {@code count} characters in this reader. Subsequent {@code read()}'s
will not return these characters unless {@code reset()} is used. The
default implementation is to skip characters in the filtered reader.
synchronized (lock) {
return in.skip(count);
}
|