public class CSVTokenizer extends Object implements Closeable
CSVTokenType| Modifier and Type | Field and Description |
|---|---|
String |
cell
String representation of the cell at the cursor position.
|
static char |
DEFAULT_SEPARATOR
The default separator to use
|
CSVTokenType |
lastType |
int |
line |
CSVTokenType |
ttype
The token at the cursor position
|
| Constructor and Description |
|---|
CSVTokenizer(Reader reader)
Creates a tokenizer that reads from a java.io.Reader.
|
CSVTokenizer(Reader reader,
char separator)
Creates a tokenizer that reads from a java.io.Reader.
|
CSVTokenizer(String uri)
Creates a tokenizer that reads from a URL.
|
CSVTokenizer(String uri,
char separator)
Creates a tokenizer that reads from a uri.
|
CSVTokenizer(String uri,
char separator,
String encoding) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the source
|
CSVTokenType |
lastTtype() |
CSVTokenType |
next()
Returns the next token.
|
void |
skipLine() |
public static final char DEFAULT_SEPARATOR
public CSVTokenType ttype
public CSVTokenType lastType
public String cell
public int line
public CSVTokenizer(String uri) throws IOException
uri - the URL to read fromIOException - if stream access failspublic CSVTokenizer(String uri, char separator) throws IOException
uri - the uri to read fromseparator - character used for separating CSV cellsIOException - if stream access failspublic CSVTokenizer(String uri, char separator, String encoding) throws IOException
IOExceptionpublic CSVTokenizer(Reader reader)
reader - the reader to use as inputpublic CSVTokenizer(Reader reader, char separator)
reader - the reader to use as inputseparator - character used for separating CSV cellspublic CSVTokenType next() throws IOException
IOException - if source access failspublic void skipLine()
throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic CSVTokenType lastTtype()
Copyright © 2006–2016 Volker Bergmann. All rights reserved.