|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.JCCSVParser
Utility class for loading comma-separated values. Given a stream of the format:
token1, token2 token3, token4This class is capapble of loading the stream into a vector of vectors.
Field Summary | |
protected StreamTokenizer |
tokenizer
The stream tokenizer used to read the data. |
Constructor Summary | |
JCCSVParser()
|
Method Summary | |
protected void |
initTokenizer(Reader r)
Configures the tokenizer to read the CSV stream. |
int |
readAndParse(Reader r,
Vector vv)
This method reads the stream provided by r and puts the parsed contents into the Vector vv. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected StreamTokenizer tokenizer
Constructor Detail |
public JCCSVParser()
Method Detail |
protected void initTokenizer(Reader r)
whitespaceChars
, which
denotes "," as a whitespace character. This is
important because StreamTokenizer
uses whitespace
as a token delimiter. Also important is the
eolIsSignificant()
setting of true
.
This returns EOL as a token that we can use to identify a new
row of data.
r
- public int readAndParse(Reader r, Vector vv) throws IOException
r
- an input readervv
- a Vector instance; if this is null,
no parsing will occur
IOException
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |