|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ctc.wstx.io.WstxInputSource
com.ctc.wstx.io.BaseInputSource
public abstract class BaseInputSource
Abstract base class that implements shared functionality that all current
WstxInputSource
implementations Woodstox includes need.
Field Summary | |
---|---|
protected char[] |
mBuffer
Input buffer this input source uses, if any. |
protected int |
mInputLast
Length of the buffer, if buffer used |
protected URL |
mSource
URL that points to original source of input, if known; null if not known (source constructed with just a stream or reader). |
Fields inherited from class com.ctc.wstx.io.WstxInputSource |
---|
mFromEntity, mParent, mScopeId |
Constructor Summary | |
---|---|
protected |
BaseInputSource(WstxInputSource parent,
String fromEntity,
String publicId,
String systemId,
URL src)
|
Method Summary | |
---|---|
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). |
Methods inherited from class com.ctc.wstx.io.WstxInputSource |
---|
closeCompletely, getEntityId, getParent, getScopeId, initInputLocation, isOrIsExpandedFrom, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected URL mSource
protected char[] mBuffer
protected int mInputLast
Constructor Detail |
---|
protected BaseInputSource(WstxInputSource parent, String fromEntity, String publicId, String systemId, URL src)
Method Detail |
---|
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()
getSource
in class WstxInputSource
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |