| Overview | Package | Class | Tree | Index | Help | NetCharts Pro (Applets) 7.0 | ||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--netcharts.util.NFToken
| Constructor Summary | |
| NFToken()
Create a new tokenizer, using the given input stream. | |
| Method Summary | |
| void | close()
Close any existing input stream |
| static java.lang.StringBuffer | doEscapes(java.lang.String str,
java.lang.StringBuffer buf)
This method appends the given string to the given string buffer, with all special characters escaped. |
| static java.lang.StringBuffer | doEscapes(java.lang.String str,
java.lang.StringBuffer buf,
boolean allowQuotes)
This method appends the given string to the given string buffer, with all special characters escaped. |
| void | getAllUntil(char symbol,
java.lang.StringBuffer buf)
Appends all characters up until the given symbol (or the EOF) to the given buffer. |
| boolean | getParamSymbol(char symbol)
Returns true if the next non-whitespace character matches the given symbol. |
| static boolean | isQuoted(java.lang.String str)
Returns true if the given string is a quoted value according to the default symbol table. |
| boolean | isWhiteSpace(int c)
Returns true if the character is whitespace. |
| static int | loadTable(java.lang.Object table,
java.lang.Object input)
Returns a generic input stream which may contain comment lines and lines with two values, separated by white space. |
| NFKeyValue | nextStatement()
Retrieves the next parameter definition from the input stream and returns a key/value pair, in which the key is a String parameter name and the value is a vector of String or StringBuffer tokens. |
| java.lang.StringBuffer | nextToken()
Get the next token from the input. |
| java.lang.StringBuffer | nextToken(java.lang.StringBuffer buf)
Get the next token from the input. |
| void | setCharRange(int type,
int first,
int last)
Sets the given character type for the range of characters. |
| void | setCharType(int type,
int c,
int quote)
Set the given character type for the character <c>. |
| void | setInput(java.io.InputStream stream)
Use the given stream as input, ignoring any previous input. |
| void | setInput(java.io.InputStream stream,
boolean useBufferedStream)
Use the given stream as input, ignoring any previous input. |
| void | setInput(NFTokenInput is)
Use the given token stream as input, ignoring any previous input. |
| void | setInput(java.lang.Object obj)
Use the given object as the input, which must be one of the specific types accepted by the other setInput() methods. |
| void | setInput(java.lang.String str)
Use the given string as input, ignoring any previous input. |
| void | setInput(java.lang.StringBuffer buf)
Use the given string buffer as input, ignoring any previous input. |
| boolean | skipComment()
Skip any comment in the current input stream until the next semi-colon, carriage-return or newline character. |
| void | skipWhiteSpace()
Skip any whitespace in the input stream |
| static java.lang.String | stripQuotes(java.lang.String str)
Strip any surrounding quotes from the given string, returning a new string based on the default symbol table definition of a quote. |
| Constructor Detail |
public NFToken()
| Method Detail |
public void setInput(java.lang.String str)
str
- The string to use as input.public void setInput(java.lang.StringBuffer buf)
buf
- The stringbuffer to use as input.public void setInput(java.io.InputStream stream)
stream
- The stream to use as input.
public void setInput(java.io.InputStream stream,
boolean useBufferedStream)
stream
- The stream to use as input.
useBufferedStream
- If true, create a buffered stream on top of the stream.public void setInput(NFTokenInput is)
is
- The stream to use as input.public void setInput(java.lang.Object obj)
obj
- The input.public void close()
public void setCharType(int type,
int c,
int quote)
type
- The type.
c
- The character.
quote
- The quote.
public void setCharRange(int type,
int first,
int last)
type
- The type.
first
- The first character.
last
- The last character.
public java.lang.StringBuffer nextToken()
throws java.lang.Exception
public java.lang.StringBuffer nextToken(java.lang.StringBuffer buf)
throws java.lang.Exception
buf
- The buffer to append the next token to.
public NFKeyValue nextStatement()
throws java.lang.Exception
public static boolean isQuoted(java.lang.String str)
str
- The string to check.public static java.lang.String stripQuotes(java.lang.String str)
str
- The string to strip quotes from.
public static java.lang.StringBuffer doEscapes(java.lang.String str,
java.lang.StringBuffer buf)
str
- The string to escape.
buf
- The buffer to append the escaped string to.
public static java.lang.StringBuffer doEscapes(java.lang.String str,
java.lang.StringBuffer buf,
boolean allowQuotes)
str
- The string to escape.
buf
- The buffer to append the escaped string to.
allowQuotes
- Whether to allow quotes or not.
public boolean skipComment()
throws java.lang.Exception
public boolean isWhiteSpace(int c)
c
- The character.
public void skipWhiteSpace()
throws java.lang.Exception
public boolean getParamSymbol(char symbol)
throws java.lang.Exception
symbol
- The character to match.
public void getAllUntil(char symbol,
java.lang.StringBuffer buf)
throws java.lang.Exception
symbol
- The character to append until.
buf
- The buffer to append to.
public static int loadTable(java.lang.Object table,
java.lang.Object input)
throws java.lang.Exception
table
- The table to add to.
input
- The input.| Overview | Package | Class | Tree | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2010 |
Last Modified: Jun 29, 2010 |