|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ctc.wstx.io.WstxInputSource
public abstract class WstxInputSource
Interface that defines API actual parsers (or, "readers" in StAX lingo) can use to read input from various input sources. Needed to abstract out details of getting input from primary input files, secondary (potentially cached) referenced documents, and from parsed entities, as well as for allowing hierarchic location information for error reporting.
Field Summary | |
---|---|
protected WstxInputSource |
mParent
Parent in input source stack |
Constructor Summary | |
---|---|
protected |
WstxInputSource(WstxInputSource parent,
java.lang.String fromEntity)
|
Method Summary | |
---|---|
abstract void |
close()
Method reader calls for this input source when it has encountered EOF. |
abstract void |
closeCompletely()
Method reader MAY call to force full closing of the underlying input stream(s)/reader(s). |
protected abstract void |
doInitInputLocation(WstxInputData reader)
|
abstract boolean |
fromInternalEntity()
|
java.lang.String |
getEntityId()
|
protected abstract WstxInputLocation |
getLocation()
Method usually called to get a parent location for another input source. |
abstract WstxInputLocation |
getLocation(long total,
int row,
int col)
|
WstxInputSource |
getParent()
|
abstract java.lang.String |
getPublicId()
|
int |
getScopeId()
|
abstract java.net.URL |
getSource()
|
abstract java.lang.String |
getSystemId()
|
void |
initInputLocation(WstxInputData reader,
int currScopeId)
Method called by Reader when current input has changed to come from this input source. |
boolean |
isOrIsExpandedFrom(java.lang.String entityId)
Method that checks if this input source expanded from the specified entity id, directly or by ancestor. |
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. |
abstract void |
restoreContext(WstxInputData reader)
Method Reader calls when this input source is resumed as the current source. |
abstract 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). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final WstxInputSource mParent
Constructor Detail |
---|
protected WstxInputSource(WstxInputSource parent, java.lang.String fromEntity)
Method Detail |
---|
public final WstxInputSource getParent()
public boolean isOrIsExpandedFrom(java.lang.String entityId)
Note that entity ids are expected to have been interned (using whatever uniqueness mechanism used), and thus can be simply identity checked.
public abstract boolean fromInternalEntity()
public abstract java.net.URL getSource()
public abstract java.lang.String getPublicId()
public abstract java.lang.String getSystemId()
protected abstract WstxInputLocation getLocation()
public abstract WstxInputLocation getLocation(long total, int row, int col)
public java.lang.String getEntityId()
public int getScopeId()
public final void initInputLocation(WstxInputData reader, int currScopeId)
reader
- Reader whose data structures are to be used for
returning data readcurrScopeId
- protected abstract void doInitInputLocation(WstxInputData reader)
public abstract int readInto(WstxInputData reader) throws java.io.IOException
java.io.IOException
public abstract boolean readMore(WstxInputData reader, int minAmount) throws java.io.IOException
java.io.IOException
public abstract void saveContext(WstxInputData reader)
public abstract void restoreContext(WstxInputData reader)
public abstract void close() throws java.io.IOException
java.io.IOException
public abstract void closeCompletely() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |