|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ctc.wstx.io.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()
|
abstract int |
getInputBufferLength()
|
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()
|
abstract java.net.URL |
getSource()
|
abstract java.lang.String |
getSystemId()
|
boolean |
hasRecursion()
Method that recursively checks if this input source has been expanded -- directly or indirectly -- from specified entity. |
abstract void |
initInputLocation(WstxInputData reader)
Method called by Reader when current input has changed to come from this input 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. |
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 abstract int getInputBufferLength()
public final WstxInputSource getParent()
public boolean hasRecursion()
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 abstract void initInputLocation(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.IOExceptionpublic abstract void saveContext(WstxInputData reader)
public abstract void restoreContext(WstxInputData reader)
public abstract void close()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||