public abstract class BaseInputSource extends WstxInputSource
WstxInputSource
implementations Woodstox includes need.Modifier and Type | Field and Description |
---|---|
protected char[] |
mBuffer
Input buffer this input source uses, if any.
|
protected int |
mInputLast
Length of the buffer, if buffer used
|
mEntityDepth, mFromEntity, mParent, mScopeId
Modifier | Constructor and Description |
---|---|
protected |
BaseInputSource(WstxInputSource parent,
String fromEntity,
String publicId,
SystemId systemId) |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Method reader calls for this input source when it has encountered
EOF.
|
protected abstract void |
doInitInputLocation(WstxInputData reader) |
abstract boolean |
fromInternalEntity() |
protected WstxInputLocation |
getLocation()
This method only gets called by the 'child' input source (for example,
contents of an expanded entity), to get the enclosing context location.
|
WstxInputLocation |
getLocation(long total,
int row,
int col) |
String |
getPublicId() |
URL |
getSource() |
String |
getSystemId() |
void |
overrideSource(URL src)
Method that can be called to override originally defined source.
|
abstract int |
readInto(WstxInputData reader)
Method called to read at least one more char from input source, and
update input data appropriately.
|
abstract 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 |
restoreContext(WstxInputData reader)
Method Reader calls when this input source is resumed as the
current source.
|
void |
saveContext(WstxInputData reader)
Method Reader calls when this input source is being stored, when
a nested input source gets used instead (due to entity expansion).
|
closeCompletely, getEntityDepth, getEntityId, getParent, getScopeId, initInputLocation, isOrIsExpandedFrom, toString
protected char[] mBuffer
protected int mInputLast
protected BaseInputSource(WstxInputSource parent, String fromEntity, String publicId, SystemId systemId)
public void overrideSource(URL src)
WstxInputSource
overrideSource
in class WstxInputSource
src
- New base URL to set; may be null.public abstract boolean fromInternalEntity()
fromInternalEntity
in class WstxInputSource
public URL getSource() throws IOException
getSource
in class WstxInputSource
IOException
public String getPublicId()
getPublicId
in class WstxInputSource
public String getSystemId()
getSystemId
in class WstxInputSource
protected abstract void doInitInputLocation(WstxInputData reader)
doInitInputLocation
in class WstxInputSource
public abstract int readInto(WstxInputData reader) throws IOException, XMLStreamException
WstxInputSource
readInto
in class WstxInputSource
IOException
XMLStreamException
public abstract boolean readMore(WstxInputData reader, int minAmount) throws IOException, XMLStreamException
WstxInputSource
readMore
in class WstxInputSource
IOException
XMLStreamException
public void saveContext(WstxInputData reader)
WstxInputSource
saveContext
in class WstxInputSource
public void restoreContext(WstxInputData reader)
WstxInputSource
restoreContext
in class WstxInputSource
public abstract void close() throws IOException
WstxInputSource
close
in class WstxInputSource
IOException
protected final WstxInputLocation getLocation()
getLocation
in class WstxInputSource
public final WstxInputLocation getLocation(long total, int row, int col)
getLocation
in class WstxInputSource
Copyright © 2012–2015 FasterXML. All rights reserved.