|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.io.ParsingBuffer
public class ParsingBuffer
Parsing buffer.
| Constructor Summary | |
|---|---|
ParsingBuffer()
Constructor for ParsingBuffer instances. |
|
| Method Summary | |
|---|---|
char |
charAt(int index)
Get the character value at the indicated index. |
void |
checkIfEmpty()
Check if there are more characters to parse. |
char |
currentChar()
Get the character value at the text pointer. |
boolean |
empty()
|
char |
getChar()
|
int |
getIndex()
|
java.lang.String |
getRemainingText()
|
java.lang.String |
getText()
|
java.lang.String |
getText(int length)
|
int |
getTextLength()
|
boolean |
matches(java.lang.String value)
Test if the upcoming text matches the indicated value. |
int |
nextIndex()
|
double |
parseDouble()
|
int |
parseInt()
|
long |
parseLong()
|
Ratio |
parseRatio()
Parse a ratio in long-colon-long format. |
java.lang.String |
parseSymbol()
|
java.lang.String |
parseText()
|
void |
parseWhitespace()
Skips over whitespace in the parsing buffer. |
void |
setIndex(int index)
Set the text pointer. |
void |
setText(java.lang.String text)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParsingBuffer()
| Method Detail |
|---|
public void setText(java.lang.String text)
text - The text to parse.public boolean empty()
public char currentChar()
public char charAt(int index)
index - The indicated index.
public int getIndex()
public void setIndex(int index)
index - The intended text pointerpublic int getTextLength()
public java.lang.String getRemainingText()
public java.lang.String getText()
public java.lang.String getText(int length)
length - The number of characters wanted
public boolean matches(java.lang.String value)
value - The text to match.
public char getChar()
throws ParsingException
ParsingExceptionpublic int nextIndex()
public void checkIfEmpty()
throws ParsingException
ParsingException - when there are no more characters to parse.public void parseWhitespace()
public int parseInt()
throws java.lang.NumberFormatException
java.lang.NumberFormatException
public long parseLong()
throws java.lang.NumberFormatException
java.lang.NumberFormatException
public Ratio parseRatio()
throws java.lang.NumberFormatException
java.lang.NumberFormatException
public double parseDouble()
throws java.lang.Exception
java.lang.Exception
public java.lang.String parseSymbol()
throws ParsingException
ParsingException
public java.lang.String parseText()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||