public class ReaderSource extends BaseInputSource
| Modifier and Type | Field and Description |
|---|---|
(package private) ReaderConfig |
mConfig |
(package private) boolean |
mDoRealClose
If true, will close the underlying Reader when this source is closed;
if false will leave it open.
|
(package private) int |
mInputProcessed |
(package private) int |
mInputRow |
(package private) int |
mInputRowStart |
protected java.io.Reader |
mReader
Underlying Reader to read character data from
|
mBuffer, mInputLast, mParentLocation, mPublicId, mSavedInputProcessed, mSavedInputPtr, mSavedInputRow, mSavedInputRowStart, mSystemIdmEntityDepth, mFromEntity, mParent, mScopeId| Constructor and Description |
|---|
ReaderSource(ReaderConfig cfg,
WstxInputSource parent,
java.lang.String fromEntity,
java.lang.String pubId,
SystemId sysId,
java.io.Reader r,
boolean realClose) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Method reader calls for this input source when it has encountered
EOF.
|
private void |
closeAndRecycle(boolean fullClose) |
void |
closeCompletely()
Method reader MAY call to force full closing of the underlying
input stream(s)/reader(s).
|
protected void |
doInitInputLocation(WstxInputData reader)
Input location is easy to set, as we'll start from the beginning
of a File.
|
boolean |
fromInternalEntity()
This is a hard-coded assumption, for now this source is
only created from external entities
|
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 |
setInputOffsets(int proc,
int row,
int rowStart)
Method called to change the default offsets this source has.
|
getLocation, getLocation, getPublicId, getSource, getSystemId, overrideSource, restoreContext, saveContextgetEntityDepth, getEntityId, getParent, getScopeId, initInputLocation, isOrIsExpandedFrom, toStringfinal ReaderConfig mConfig
protected java.io.Reader mReader
final boolean mDoRealClose
int mInputProcessed
int mInputRow
int mInputRowStart
public ReaderSource(ReaderConfig cfg, WstxInputSource parent, java.lang.String fromEntity, java.lang.String pubId, SystemId sysId, java.io.Reader r, boolean realClose)
public void setInputOffsets(int proc,
int row,
int rowStart)
protected void doInitInputLocation(WstxInputData reader)
doInitInputLocation in class BaseInputSourcepublic boolean fromInternalEntity()
fromInternalEntity in class BaseInputSourcepublic int readInto(WstxInputData reader) throws java.io.IOException, javax.xml.stream.XMLStreamException
WstxInputSourcereadInto in class BaseInputSourcejava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionpublic boolean readMore(WstxInputData reader, int minAmount) throws java.io.IOException, javax.xml.stream.XMLStreamException
WstxInputSourcereadMore in class BaseInputSourcejava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionpublic void close()
throws java.io.IOException
WstxInputSourceclose in class BaseInputSourcejava.io.IOExceptionpublic void closeCompletely()
throws java.io.IOException
WstxInputSourcecloseCompletely in class WstxInputSourcejava.io.IOExceptionprivate void closeAndRecycle(boolean fullClose)
throws java.io.IOException
java.io.IOException