Package com.ctc.wstx.io
Class MergedReader
java.lang.Object
java.io.Reader
com.ctc.wstx.io.MergedReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
Simple
Reader
implementation 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 to PushbackReader
, but with this class
there's only one implicit pushback, when instance is constructed; not
general pushback buffer and methods to use it.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ReaderConfig
(package private) char[]
This buffer contains the partially read remains left over after bootstrapper has consumed xml declaration (if one found).(package private) final int
(package private) final Reader
(package private) int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mConfig
-
mIn
-
mData
char[] mDataThis buffer contains the partially read remains left over after bootstrapper has consumed xml declaration (if one found). It is generally recycled and can be returned after having been read. -
mPtr
int mPtr -
mEnd
final int mEnd
-
-
Constructor Details
-
MergedReader
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-
mark
- Overrides:
mark
in classReader
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classReader
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Specified by:
read
in classReader
- Throws:
IOException
-
ready
- Overrides:
ready
in classReader
- Throws:
IOException
-
reset
- Overrides:
reset
in classReader
- Throws:
IOException
-
skip
- Overrides:
skip
in classReader
- Throws:
IOException
-
freeMergedBuffer
private void freeMergedBuffer()
-