|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.parsers.DelimitedParser
public class DelimitedParser
Generic parser to parse delimited data.
| Nested Class Summary | |
|---|---|
(package private) class |
DelimitedParser.DelimParseThread
Thread that creates TextEvent objects from a StreamTokenizer and presents the events to a TextListener instance. |
| Constructor Summary | |
|---|---|
DelimitedParser(char delim,
char quote,
TextListener listener)
Creates a new parse with the given delimiter, quote charactor and event listener. |
|
DelimitedParser(TextListener listener)
Creates a new parser with the given listener, a ',' as delimiter and '"' as quote character. |
|
| Method Summary | |
|---|---|
char |
getDelimiter()
Returns the the delimiter that this parser uses to delimit input data. |
char |
getQuote()
Returns the the quote character that this parser uses to denote constant strings. |
void |
parse(java.io.InputStream is,
boolean wait)
Parses the given InputStream and notifies the listener of parsing events. |
void |
setDelimiter(char delim)
Set the delimiter for this parser. |
void |
setQuote(char quote)
Set the quote character for this parser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DelimitedParser(TextListener listener)
listener - TextListener that will receive notification of events.
public DelimitedParser(char delim,
char quote,
TextListener listener)
throws java.io.IOException
delim - Delimiter that will be used to delimit input data.quote - Indicates what character denotes constant strings.listener - TextListener that will receive notification of events.
java.io.IOException| Method Detail |
|---|
public char getDelimiter()
public void setDelimiter(char delim)
delim - New delimiter.public char getQuote()
public void setQuote(char quote)
quote - New quote character.
public void parse(java.io.InputStream is,
boolean wait)
throws java.io.IOException
is - InputStream containing data to parsewait - boolean to indicate whether not this method should wait for
parsing to stop before returning.
java.io.IOException - if a an exception occurs during parsing.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||