|
Matra DTD Parser 0.8b | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.conradroche.matra.data.Data
|
+--com.conradroche.matra.data.ParseableData
Class created by refactoring the Data class. It contains parsing related methods.
| Fields inherited from class com.conradroche.matra.data.Data |
CHAR_NOT_FOUND, END_OF_DATA_CHAR, FOUND_CHAR |
| Constructor Summary | |
ParseableData()
ParseableData constructor. |
|
ParseableData(String strData)
ParseableData constructor. |
|
| Method Summary | |
String |
getNextToken()
Read the next token, delimited by a whitespace, from the data stream. |
String |
getNextToken(char delim)
Read the next token, delimited by the specified delimiter, from the data stream. |
String |
getNextToken(char[] delims)
Read the next token, delimited by one of the specified delimiters, from the data stream. |
static boolean |
isWhiteSpace(char c)
Check if the given char is a whitespace. |
boolean |
nextStringEquals(char[] str)
Check if the current location starts with the string specified. |
boolean |
nextStringEquals(String str)
Check if the current location starts with the string specified. |
boolean |
nextTokenEquals(char[] str)
Checks if the next token, delimited by whitespace, is equal to the specified string (char array). |
boolean |
nextTokenEquals(String str)
Checks if the next token, delimited by whitespace, is equal to the specified string. |
void |
skipChars(char[] delims)
Read from the data stream while the char is among the one specified. |
void |
skipChars(int numChars)
Skip the next few chars. |
void |
skipWhiteSpace()
Read from the data stream while the char is a whitespace character. |
| Methods inherited from class com.conradroche.matra.data.Data |
checkNextChar, endOfData, getColumn, getCurrentLocation, getCurrentPosition, getNextChar, getPrevChar, getRemaining, getRow, length, lookNextChar, peekAhead, reset, rewind, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ParseableData()
public ParseableData(String strData)
strData - The data to be parsed.| Method Detail |
public String getNextToken()
public boolean nextStringEquals(String str)
str - The string to check against.true if the current location
starts with the string specified;
false otherwise.public boolean nextStringEquals(char[] str)
str - The string to check against.true if the current location
starts with the string specified;
false otherwise.public boolean nextTokenEquals(String str)
str - String to check the next token against.true if the next token in the
data stream is equal to the string specified;
false otherwise.public boolean nextTokenEquals(char[] str)
str - String to check the next token against.true if the next token in the
data stream is equal to the string specified;
false otherwise.public String getNextToken(char[] delims)
delims - The list of delimiters for the Token.public String getNextToken(char delim)
delim - The delimiter for the Token.public void skipChars(char[] delims)
delims - The list of characters to be skipped.public void skipChars(int numChars)
numChars - Number of characters to skip.
0 will not skip any characters.
1 will read and discard one charater.public void skipWhiteSpace()
public static boolean isWhiteSpace(char c)
c - The character to be checked.true if the char is a whitespace char; if not returns false.
|
Matra DTD Parser 0.8b | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||