| Modifier and Type | Field and Description |
|---|---|
| protected int | mEntityDepth
Number of parent entities that have been expanded to get to this input source; 0 for root-level input that is not generated via entity expansion. |
| protected final String | mFromEntity
Name/id of the entity that was expanded to produce this input source; null if not entity-originated. |
| protected final WstxInputSource | mParent
Parent in input source stack |
| protected int | mScopeId
Scope of the reader when this entity was initially expanded. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract void | closeCompletely()
Method reader MAY call to force full closing of the underlying input stream(s)/reader(s). |
| protected abstract void | |
| public abstract boolean | Returns: True, if this input source was directly expanded from an internal entity (general, parsed); false if not (from external entity, DTD ext. subset, main document)
|
| public int | |
| public String | |
| protected abstract WstxInputLocation | |
| public abstract WstxInputLocation | |
| public final WstxInputSource | |
| public abstract String | |
| public int | |
| public abstract URL | |
| public abstract String | |
| public final void | initInputLocation(WstxInputData
Reader whose data structures are to be used for
returning data read reader, int currScopeId, int entityDepth)Method called by Reader when current input has changed to come from this input source. |
| public boolean | isOrIsExpandedFrom(String entityId)
Method that checks if this input source expanded from the specified entity id, directly or by ancestor. |
| public abstract void | overrideSource(URL
New base URL to set; may be null. url)Method that can be called to override originally defined source. |
| public abstract int | Returns: Number of characters read from the input source (at least 1), if it had any input; -1 if input source has no more input.Method called to read at least one more char from input source, and update input data appropriately. |
| public abstract boolean | Returns: True if input source was able to provide specific number of characters or more; false if not. In latter case, source is free to return zero or more characters any way.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. |
| public abstract void | restoreContext(WstxInputData reader)
Method Reader calls when this input source is resumed as the current source. |
| public 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). |
| public String |
| mEntityDepth | back to summary |
|---|---|
| protected int mEntityDepth Number of parent entities that have been expanded to get to this input source; 0 for root-level input that is not generated via entity expansion. | |
| mFromEntity | back to summary |
|---|---|
| protected final String mFromEntity Name/id of the entity that was expanded to produce this input source; null if not entity-originated. Used for catching recursive expansions of entities. | |
| mParent | back to summary |
|---|---|
| protected final WstxInputSource mParent Parent in input source stack | |
| mScopeId | back to summary |
|---|---|
| protected int mScopeId Scope of the reader when this entity was initially expanded. Snapshot that will generally be used by the reader to match scoping limitations, such as proper nesting entity expansion with respect to element and declaration nesting. | |
| WstxInputSource | back to summary |
|---|---|
| protected WstxInputSource(WstxInputSource parent, String fromEntity) | |
| close | back to summary |
|---|---|
| public abstract void close() throws IOException Method reader calls for this input source when it has encountered EOF. This may or may not close the underlying stream/reader; what happens depends on configuration | |
| closeCompletely | back to summary |
|---|---|
| public abstract void closeCompletely() throws IOException Method reader MAY call to force full closing of the underlying input stream(s)/reader(s). No checks are done regarding configuration, but input source object is to deal gracefully with multiple calls (ie. it's not an error for reader to call this more than once). | |
| doInitInputLocation | back to summary |
|---|---|
| protected abstract void doInitInputLocation(WstxInputData reader) | |
| fromInternalEntity | back to summary |
|---|---|
public abstract boolean fromInternalEntity()
| |
| getEntityDepth | back to summary |
|---|---|
| public int getEntityDepth() | |
| getEntityId | back to summary |
|---|---|
| public String getEntityId() | |
| getLocation | back to summary |
|---|---|
| protected abstract WstxInputLocation getLocation() Method usually called to get a parent location for another input source. Works since at this point context (line, row, chars) information has already been saved to this object. | |
| getLocation | back to summary |
|---|---|
| public abstract WstxInputLocation getLocation(long total, int row, int col) | |
| getParent | back to summary |
|---|---|
| public final WstxInputSource getParent() | |
| getPublicId | back to summary |
|---|---|
| public abstract String getPublicId() | |
| getScopeId | back to summary |
|---|---|
| public int getScopeId() | |
| getSource | back to summary |
|---|---|
| public abstract URL getSource() throws IOException | |
| getSystemId | back to summary |
|---|---|
| public abstract String getSystemId() | |
| initInputLocation | back to summary |
|---|---|
| public final void initInputLocation(WstxInputData reader, int currScopeId, int entityDepth) Method called by Reader when current input has changed to come from this input source. Should reset/initialize input location information Reader keeps, for error messages to work ok.
| |
| isOrIsExpandedFrom | back to summary |
|---|---|
| public boolean isOrIsExpandedFrom(String entityId) Method that checks if this input source expanded from the specified entity id, directly or by ancestor. Note that entity ids are expected to have been interned (using whatever uniqueness mechanism used), and thus can be simply identity checked. | |
| overrideSource | back to summary |
|---|---|
| public abstract void overrideSource(URL url) Method that can be called to override originally defined source.
| |
| readInto | back to summary |
|---|---|
| public abstract int readInto(WstxInputData reader) throws IOException, XMLStreamException Method called to read at least one more char from input source, and update input data appropriately.
| |
| readMore | back to summary |
|---|---|
| public abstract boolean readMore(WstxInputData reader, int minAmount) throws IOException, XMLStreamException 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. If so, it asks input source to do whatever it has to do to try to get more data, if possible (including moving stuff in input buffer if necessary and possible).
| |
| restoreContext | back to summary |
|---|---|
| public abstract void restoreContext(WstxInputData reader) Method Reader calls when this input source is resumed as the current source. Needs to update Reader's input location data used for error messages etc. | |
| saveContext | back to summary |
|---|---|
| public 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). Needs to get location info from Reader and store it in this Object. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |