com.bbn.openmap.util
Class CSVTokenizer
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--java.io.PushbackReader
|
+--com.bbn.openmap.util.Tokenizer
|
+--com.bbn.openmap.util.CSVTokenizer
- public class CSVTokenizer
- extends Tokenizer
Tokenizer for comma separated values files, at least as generated
by excel.
token() returns the next token, which can be either:
- null, indicating an empty field.
- a Double, indicating a numeric field.
- a String, indicating an alphanumeric field.
- the NEWLINE object, indicating the end of a record.
- the EOF object, test with isEOF(), indicating the end of file.
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary |
CSVTokenizer(java.io.Reader in)
|
CSVTokenizer(java.io.Reader in,
boolean numberReadAsString)
If you set numberReadAsString is true, then any number will be
maintained as a String. |
Method Summary |
static void |
main(java.lang.String[] args)
|
java.lang.Object |
token()
Return the next object read from the stream. |
Methods inherited from class com.bbn.openmap.util.Tokenizer |
bclear, bpush, error, isAlpha, isAlphanumeric, isAny, isDigit, isEOF, isNewline, next, putback |
Methods inherited from class java.io.PushbackReader |
close, mark, markSupported, read, read, ready, reset, unread, unread, unread |
Methods inherited from class java.io.FilterReader |
skip |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSVTokenizer
public CSVTokenizer(java.io.Reader in)
CSVTokenizer
public CSVTokenizer(java.io.Reader in,
boolean numberReadAsString)
- If you set numberReadAsString is true, then any number will be
maintained as a String.
token
public java.lang.Object token()
- Return the next object read from the stream.
main
public static void main(java.lang.String[] args)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details