public class MarkableSequenceReader extends ReaderLike a
MarkableSequenceInputStreambut for characters.
This class implements
resetby calling the corresponding methods on the underlying readers; it does not add buffering or have any means of providing
resetsupport if the underlying readers do not.
SequenceInputStream, each underlying reader, when completely read and no longer needed, is closed to free resources. This instance itself will remain in "open at EOF" condition until explicitly closed, but does not prevent reclamation of the underlying readers.
SequenceInputStream, this class can keep underlying readers open, after fully reading them, if a
markhas been set, so that
resetwill be possible. When a mark is no longer needed, it can be canceled (by calling
readlimitof 0) to again allow the underlying readers to be reclaimed as soon as possible.
public int read(char b, int off, int len) throws IOException
public long skip(long n) throws IOException
public void close() throws IOException
public void mark(int readlimit) throws IOExceptionMarks the current position in this reader. In this implementation, it is possible to 'cancel' a mark, by passing this method a
readlimitof zero, returning the reader immediately to the state of having no mark.
public boolean markSupported()Tests if this reader supports the mark and reset methods.
For any instance of this class, the result is determined by the first call to this method, and does not change thereafter. At the first call, the result is determined only by the underlying readers remaining to be read (or, if a mark has been set, which is possible before checking this method, then by the underlying readers including and following the one that was current when the mark was set). The result will be
trueunless any of those underlying readers reports it as