public final class BranchingReaderSource extends ReaderSource
Currently this Reader is only used as the main-level Reader, to allow for branching of internal DTD subset to a text buffer if necessary.
Modifier and Type | Field and Description |
---|---|
(package private) TextBuffer |
mBranchBuffer |
(package private) int |
mBranchStartOffset |
(package private) boolean |
mConvertLFs |
(package private) boolean |
mGotCR
Flag that indicates that last char from previous buffer was
'\r', and that following '\n' (if there is one) needs to be
ignored.
|
mConfig, mDoRealClose, mInputProcessed, mInputRow, mInputRowStart, mReader
mBuffer, mInputLast, mParentLocation, mPublicId, mSavedInputProcessed, mSavedInputPtr, mSavedInputRow, mSavedInputRowStart, mSystemId
mEntityDepth, mFromEntity, mParent, mScopeId
Constructor and Description |
---|
BranchingReaderSource(ReaderConfig cfg,
java.lang.String pubId,
SystemId sysId,
java.io.Reader r,
boolean realClose) |
Modifier and Type | Method and Description |
---|---|
private void |
appendBranched(int startOffset,
int pastEnd) |
void |
endBranch(int endOffset)
Currently this input source does not implement branching
|
int |
readInto(WstxInputData reader)
Method called to read at least one more char from input source, and
update input data appropriately.
|
boolean |
readMore(WstxInputData reader,
int minAmount)
Method called by reader when it has to have at least specified number
of consequtive input characters in its buffer, and it currently does
not have.
|
void |
startBranch(TextBuffer tb,
int startOffset,
boolean convertLFs) |
close, closeCompletely, doInitInputLocation, fromInternalEntity, setInputOffsets
getLocation, getLocation, getPublicId, getSource, getSystemId, overrideSource, restoreContext, saveContext
getEntityDepth, getEntityId, getParent, getScopeId, initInputLocation, isOrIsExpandedFrom, toString
TextBuffer mBranchBuffer
int mBranchStartOffset
boolean mConvertLFs
boolean mGotCR
public BranchingReaderSource(ReaderConfig cfg, java.lang.String pubId, SystemId sysId, java.io.Reader r, boolean realClose)
public int readInto(WstxInputData reader) throws java.io.IOException, javax.xml.stream.XMLStreamException
WstxInputSource
readInto
in class ReaderSource
java.io.IOException
javax.xml.stream.XMLStreamException
public boolean readMore(WstxInputData reader, int minAmount) throws java.io.IOException, javax.xml.stream.XMLStreamException
WstxInputSource
readMore
in class ReaderSource
java.io.IOException
javax.xml.stream.XMLStreamException
public void startBranch(TextBuffer tb, int startOffset, boolean convertLFs)
public void endBranch(int endOffset)
private void appendBranched(int startOffset, int pastEnd)