Package com.ctc.wstx.io
Class MergedReader
- java.lang.Object
-
- java.io.Reader
-
- com.ctc.wstx.io.MergedReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public final class MergedReader extends Reader
SimpleReaderimplementation that is used to "unwind" some data previously read from a Reader; so that as long as some of that data remains, it's returned; but as long as it's read, we'll just use data from the underlying original Reader. This is similar toPushbackReader, but with this class there's only one implicit pushback, when instance is constructed; not general pushback buffer and methods to use it.
-
-
Constructor Summary
Constructors Constructor Description MergedReader(ReaderConfig cfg, Reader in, char[] buf, int start, int end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidmark(int readlimit)booleanmarkSupported()intread()intread(char[] cbuf)intread(char[] cbuf, int off, int len)booleanready()voidreset()longskip(long n)-
Methods inherited from class java.io.Reader
nullReader, read, transferTo
-
-
-
-
Constructor Detail
-
MergedReader
public MergedReader(ReaderConfig cfg, Reader in, char[] buf, int start, int end)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
mark
public void mark(int readlimit) throws IOException- Overrides:
markin classReader- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classReader
-
read
public int read() throws IOException- Overrides:
readin classReader- Throws:
IOException
-
read
public int read(char[] cbuf) throws IOException- Overrides:
readin classReader- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
ready
public boolean ready() throws IOException- Overrides:
readyin classReader- Throws:
IOException
-
reset
public void reset() throws IOException- Overrides:
resetin classReader- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classReader- Throws:
IOException
-
-