|
|||||||||
| Home >> All >> org >> apache >> xerces >> [ readers overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xerces.readers
Interface XMLEntityHandler.EntityReader

- All Known Implementing Classes:
- DefaultEntityHandler.NullReader, XMLEntityReader
- Enclosing interface:
- XMLEntityHandler
- public static interface XMLEntityHandler.EntityReader
This is the interface for scanners to process input data from entities without needing to know the details of the underlying storage of those entities, or their encodings. The methods in this interface have been refined over time to a rough balance between keeping the XML grammar dependent code within the scanner classes, and allowing high performance processing of XML documents.
| Method Summary | |
int |
addString(int offset,
int length)
Add a string to the StringPool from the characters scanned using this
reader as described by offset and length. |
int |
addSymbol(int offset,
int length)
Add a symbol to the StringPool from the characters scanned using this
reader as described by offset and length. |
void |
append(XMLEntityHandler.CharBuffer charBuffer,
int offset,
int length)
Append the characters processed by this reader associated with offset and
length to the CharBuffer. |
int |
currentOffset()
Return the current offset within this reader. |
int |
getColumnNumber()
Return the column number of the current position within the document that we are processing. |
boolean |
getInCDSect()
This method is provided for scanner implementations. |
int |
getLineNumber()
Return the line number of the current position within the document that we are processing. |
boolean |
lookingAtChar(char ch,
boolean skipPastChar)
Test that the current character is a ch character. |
boolean |
lookingAtSpace(boolean skipPastChar)
Test that the current character is a whitespace character. |
boolean |
lookingAtValidChar(boolean skipPastChar)
Test that the current character is valid. |
int |
scanAttValue(char qchar,
boolean asSymbol)
Scan an attribute value. |
int |
scanCharRef(boolean isHexadecimal)
Scan a character reference. |
int |
scanContent(org.apache.xerces.utils.QName element)
Skip through the input while we are looking at character data. |
int |
scanEntityValue(int qchar,
boolean createString)
Scan an entity value. |
boolean |
scanExpectedName(char fastcheck,
org.apache.xerces.utils.StringPool.CharArrayRange expectedName)
Scan the name that is expected at the current position in the document. |
int |
scanInvalidChar()
Scan an invalid character. |
int |
scanName(char fastcheck)
Add a sequence of characters that match the XML definition of a Name to the StringPool. |
void |
scanQName(char fastcheck,
org.apache.xerces.utils.QName qname)
Add a sequence of characters that match the XML Namespaces definition of a QName to the StringPool. |
int |
scanStringLiteral()
Scan a string literal. |
void |
setInCDSect(boolean inCDSect)
This method is provided for scanner implementations. |
void |
skipPastName(char fastcheck)
Skip past a sequence of characters that match the XML definition of a Name. |
void |
skipPastNmtoken(char fastcheck)
Skip past a sequence of characters that match the XML definition of an Nmtoken. |
void |
skipPastSpaces()
Skip past whitespace characters starting at the current position. |
boolean |
skippedString(char[] s)
Skip past a sequence of characters that matches the specified character array. |
void |
skipToChar(char ch)
Advance through the input data up to the next ch character. |
| Method Detail |
currentOffset
public int currentOffset()
- Return the current offset within this reader.
getLineNumber
public int getLineNumber()
- Return the line number of the current position within the document that we are processing.
getColumnNumber
public int getColumnNumber()
- Return the column number of the current position within the document that we are processing.
setInCDSect
public void setInCDSect(boolean inCDSect)
- This method is provided for scanner implementations.
getInCDSect
public boolean getInCDSect()
- This method is provided for scanner implementations.
append
public void append(XMLEntityHandler.CharBuffer charBuffer, int offset, int length)
- Append the characters processed by this reader associated with
offsetandlengthto theCharBuffer.
addString
public int addString(int offset,
int length)
- Add a string to the
StringPoolfrom the characters scanned using this reader as described byoffsetandlength.
addSymbol
public int addSymbol(int offset,
int length)
- Add a symbol to the
StringPoolfrom the characters scanned using this reader as described byoffsetandlength.
lookingAtChar
public boolean lookingAtChar(char ch,
boolean skipPastChar)
throws java.lang.Exception
- Test that the current character is a
chcharacter.
lookingAtValidChar
public boolean lookingAtValidChar(boolean skipPastChar)
throws java.lang.Exception
- Test that the current character is valid.
lookingAtSpace
public boolean lookingAtSpace(boolean skipPastChar)
throws java.lang.Exception
- Test that the current character is a whitespace character.
skipToChar
public void skipToChar(char ch)
throws java.lang.Exception
- Advance through the input data up to the next
chcharacter.
skipPastSpaces
public void skipPastSpaces()
throws java.lang.Exception
- Skip past whitespace characters starting at the current position.
skipPastName
public void skipPastName(char fastcheck)
throws java.lang.Exception
- Skip past a sequence of characters that match the XML definition of a Name.
skipPastNmtoken
public void skipPastNmtoken(char fastcheck)
throws java.lang.Exception
- Skip past a sequence of characters that match the XML definition of an Nmtoken.
skippedString
public boolean skippedString(char[] s)
throws java.lang.Exception
- Skip past a sequence of characters that matches the specified character array.
scanInvalidChar
public int scanInvalidChar()
throws java.lang.Exception
- Scan an invalid character.
scanCharRef
public int scanCharRef(boolean isHexadecimal)
throws java.lang.Exception
- Scan a character reference.
scanStringLiteral
public int scanStringLiteral()
throws java.lang.Exception
- Scan a string literal.
scanAttValue
public int scanAttValue(char qchar,
boolean asSymbol)
throws java.lang.Exception
- Scan an attribute value.
scanEntityValue
public int scanEntityValue(int qchar,
boolean createString)
throws java.lang.Exception
- Scan an entity value.
scanName
public int scanName(char fastcheck)
throws java.lang.Exception
- Add a sequence of characters that match the XML definition of a Name to the
StringPool. If we find a name at the current position we will add it to theStringPoolas a symbol and will return the string pool handle for that symbol to the caller.
scanExpectedName
public boolean scanExpectedName(char fastcheck,
org.apache.xerces.utils.StringPool.CharArrayRange expectedName)
throws java.lang.Exception
- Scan the name that is expected at the current position in the document.
This method is invoked when we are scanning the element type in an end tag
that must match the element type in the corresponding start tag.
scanQName
public void scanQName(char fastcheck,
org.apache.xerces.utils.QName qname)
throws java.lang.Exception
- Add a sequence of characters that match the XML Namespaces definition of a QName
to the
StringPool. If we find a QName at the current position we will add it to theStringPooland will return the string pool handle of that QName to the caller.
scanContent
public int scanContent(org.apache.xerces.utils.QName element) throws java.lang.Exception
- Skip through the input while we are looking at character data.
|
|||||||||
| Home >> All >> org >> apache >> xerces >> [ readers overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC