|
XML for Java 2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.framework.XMLReader
This is the class used by the scanner to process the XML data.
This class provides the scanner with location information through
the Locator
interface.
XMLParser
,
Locator
Field Summary | |
static int |
CHARDATA_RESULT_ALL_SPACE
|
static int |
CHARDATA_RESULT_CDEND
|
static int |
CHARDATA_RESULT_CHARDATA
|
static int |
CHARDATA_RESULT_INVALID_CHAR
|
static int |
CHARDATA_RESULT_MARKUP
|
static int |
CHARDATA_RESULT_REFERENCE
|
static int |
CHARDATA_RESULT_STATE_MASK
|
protected static byte |
E_CharDataFlag
|
protected static byte |
E_EncNameFlag
|
protected static byte |
E_InitialNameCharFlag
|
protected static byte |
E_NameCharFlag
|
protected static byte |
E_PubidCharFlag
|
protected static byte |
E_VersionNumFlag
|
protected int |
fCarriageReturnCounter
|
protected int |
fCharacterCounter
|
protected int |
fCurrentOffset
|
protected static byte[] |
fgAsciiAlphaChar
|
protected static byte[] |
fgAsciiCharData
|
protected static byte[] |
fgAsciiInitialNameChar
|
protected static byte[] |
fgAsciiNameChar
|
protected static byte[] |
fgAsciiWSCharData
|
protected static byte[] |
fgAsciiXDigitChar
|
protected static byte[] |
fgCharFlags
|
protected int |
fLinefeedCounter
|
protected ParserState |
fParserState
|
protected java.lang.String |
fPublicId
|
protected java.lang.String |
fSystemId
|
Constructor Summary | |
protected |
XMLReader(ParserState parserState,
java.lang.String publicId,
java.lang.String systemId)
Default constructor |
Method Summary | |
abstract 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 . |
abstract 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 . |
abstract void |
append(ChunkyCharArray charArray,
int offset,
int length)
Append the characters processed by this reader associated with offset and
length to the ChunkyCharArray . |
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. |
int |
getLineNumber()
Return the line number of the current position within the document that we are processing. |
java.lang.String |
getPublicId()
Return the public identifier of the InputSource that we are processing. |
java.lang.String |
getSystemId()
Return the system identifier of the InputSource that we are processing. |
abstract boolean |
lookingAtChar(char ch)
Test that the current character is a ch character. |
abstract boolean |
lookingAtSpace()
Test that the current character is a whitespace character. |
abstract boolean |
lookingAtValidChar()
Test that the current character is valid. |
abstract int |
scanContent(ScanContentState scanState)
Skip through the input data while we are looking at character data. |
abstract int |
scanName(char fastcheck,
int expectedName)
Add a sequence of characters that match the XML definition of a Name to the StringPool . |
abstract int |
skipAsciiChar()
Skip one ascii character. |
abstract int |
skipDecimalDigit()
Skip a single decimal digit character. |
abstract int |
skipHexDigit()
Skip a single hexadecimal digit character. |
abstract int |
skipInvalidChar(int errorCode)
Advance past an invalid character, reporting it as an errorCode error. |
abstract int |
skipOneChar()
Skip one character. |
abstract int |
skipPastChar(char ch)
Advance through the input data beyond the next ch character. |
abstract int |
skipPastName(char fastcheck)
Skip past a sequence of characters that match the XML definition of a Name. |
abstract int |
skipPastNmtoken(char fastcheck)
Skip past a sequence of characters that match the XML definition of an Nmtoken. |
abstract int |
skipPastSpaces()
Skip past whitespace characters starting at the current position. |
abstract boolean |
skippedAlpha()
Skip a single ascii alpha character. |
abstract boolean |
skippedChar(char ch)
Advance past a ch character. |
abstract boolean |
skippedEncName()
Skip a single character defined by XML as a EncName character. |
abstract boolean |
skippedPubidChar()
Skip a single character defined by XML as a PubidChar character. |
abstract boolean |
skippedSpace()
Advance past one whitespace character. |
abstract boolean |
skippedString(char[] s)
Skip past a sequence of characters that matches the specified character array. |
abstract boolean |
skippedValidChar()
Advance past one valid character. |
abstract boolean |
skippedVersionNum()
Skip a single character defined by XML as a VersionNum character. |
abstract int |
skipToChar(char ch)
Advance through the input data up to the next ch character. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int CHARDATA_RESULT_MARKUP
public static final int CHARDATA_RESULT_REFERENCE
public static final int CHARDATA_RESULT_CDEND
public static final int CHARDATA_RESULT_INVALID_CHAR
public static final int CHARDATA_RESULT_STATE_MASK
public static final int CHARDATA_RESULT_CHARDATA
public static final int CHARDATA_RESULT_ALL_SPACE
protected ParserState fParserState
protected java.lang.String fPublicId
protected java.lang.String fSystemId
protected int fCarriageReturnCounter
protected int fLinefeedCounter
protected int fCharacterCounter
protected int fCurrentOffset
protected static final byte[] fgAsciiXDigitChar
protected static final byte[] fgAsciiAlphaChar
protected static final byte[] fgAsciiInitialNameChar
protected static final byte[] fgAsciiNameChar
protected static final byte[] fgAsciiCharData
protected static final byte[] fgAsciiWSCharData
protected static final byte E_VersionNumFlag
protected static final byte E_EncNameFlag
protected static final byte E_PubidCharFlag
protected static final byte E_CharDataFlag
protected static final byte E_InitialNameCharFlag
protected static final byte E_NameCharFlag
protected static byte[] fgCharFlags
Constructor Detail |
protected XMLReader(ParserState parserState, java.lang.String publicId, java.lang.String systemId)
parser
- The parser that we are working for.publicID
- The public identifier of the InputSource
that we are processing, or null if not provided.systemID
- The system identifier of the InputSource
that we are processing, or null if not provided.Method Detail |
public java.lang.String getPublicId()
InputSource
that we are processing.Locator
public java.lang.String getSystemId()
InputSource
that we are processing.Locator
public int getLineNumber()
Locator
public int getColumnNumber()
Locator
public abstract int addString(int offset, int length)
StringPool
from the characters scanned using this
reader as described by offset
and length
.offset
- The offset within this reader where the characters start.length
- The length within this reader where the characters end.StringPool
of the resulting string.public abstract int addSymbol(int offset, int length)
StringPool
from the characters scanned using this
reader as described by offset
and length
.offset
- The offset within this reader where the characters start.length
- The length within this reader where the characters end.StringPool
of the resulting symbol.public abstract void append(ChunkyCharArray charArray, int offset, int length)
offset
and
length
to the ChunkyCharArray
.charArray
- The ChunkyCharArray
to append the characters to.offset
- The offset within this reader where the copy should start.length
- The length within this reader where the copy should stop.public abstract int skipOneChar() throws java.lang.Exception
public abstract int skipAsciiChar() throws java.lang.Exception
public abstract int skipToChar(char ch) throws java.lang.Exception
ch
character.public abstract int skipPastChar(char ch) throws java.lang.Exception
ch
character.public abstract boolean skippedValidChar() throws java.lang.Exception
true
if the current character was valid and skipped;
false
otherwise.public abstract boolean lookingAtValidChar() throws java.lang.Exception
true
if the current character is valid;
false
otherwise.public abstract int skipInvalidChar(int errorCode) throws java.lang.Exception
errorCode
error.public abstract boolean skippedChar(char ch) throws java.lang.Exception
ch
character.ch
- The character to match against.true
if the current character was a ch
character and skipped;
false
otherwise.public abstract boolean lookingAtChar(char ch) throws java.lang.Exception
ch
character.ch
- The character to match against.true
if the current character is a ch
character;
false
otherwise.public abstract boolean skippedSpace() throws java.lang.Exception
true
if the current character was whitespace and skipped;
false
otherwise.public abstract boolean lookingAtSpace() throws java.lang.Exception
true
if the current character is whitespace;
false
otherwise.public abstract int skipPastSpaces() throws java.lang.Exception
public abstract int skipDecimalDigit() throws java.lang.Exception
public abstract int skipHexDigit() throws java.lang.Exception
public abstract boolean skippedAlpha() throws java.lang.Exception
true
if the current character was alpha and skipped;
false
otherwise.public abstract boolean skippedVersionNum() throws java.lang.Exception
true
if the current character is a VersionNum character and skipped;
false
otherwise.public abstract boolean skippedEncName() throws java.lang.Exception
true
if the current character is a EncName character and skipped;
false
otherwise.public abstract boolean skippedPubidChar() throws java.lang.Exception
true
if the current character is a PubidChar character and skipped;
false
otherwise.public abstract boolean skippedString(char[] s) throws java.lang.Exception
s
- The characters to match.true
if the current character is valid;
false
otherwise.public abstract int scanName(char fastcheck, int expectedName) throws java.lang.Exception
StringPool
.
If we find a name at the current position we will add it to the StringPool
as a symbol and will return the index within the string pool to the caller.fastcheck
- A character that is not a legal name character that is provided as a
hint to the reader of a character likely to terminate the Name.expectedName
- The index within the StringPool
of the name that
must match the name at the current position, or -1 if there is no
specific name expected.StringPool
of the name that
was scanned, or -1 if a name was not found at the current position
within the input data.StringPool
public abstract int skipPastName(char fastcheck) throws java.lang.Exception
public abstract int skipPastNmtoken(char fastcheck) throws java.lang.Exception
public abstract int scanContent(ScanContentState scanState) throws java.lang.Exception
ScanContentState
public final int currentOffset()
|
XML for Java 2.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |