public abstract class CSVParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoCorrectBadQuotes |
protected java.text.DateFormat |
dateFormatddMMyy |
protected java.text.DateFormat |
dateFormatddMMyyyy |
protected java.text.DateFormat |
dateFormatyyyyMMdd |
static char |
DEFAULT_DELIMITER |
protected java.text.DateFormat |
defaultFormat |
protected char |
delimiter |
protected java.util.Vector<java.lang.String> |
fields |
protected java.text.DateFormat |
timeFormatHHmmss |
Constructor and Description |
---|
CSVParser() |
Modifier and Type | Method and Description |
---|---|
java.sql.Date |
getDate(int columnNbr)
Returns the date of the column as specified by column number beginning with 1.
|
double |
getDouble(int columnNbr,
boolean commaSeparatesDecimal)
Returns the value of the column as specified by column number as double
|
int |
getFieldCount()
Returns the number of fields read by nextRow().
|
int |
getInt(int columnNbr)
Returns the value of the column as specified by column number as integer
|
java.lang.String |
getText(int columnNbr)
Returns the value of the column as specified by column number beginning with 1.
|
java.sql.Time |
getTime(int columnNbr) |
protected void |
parseFields(java.lang.String line) |
public static final char DEFAULT_DELIMITER
protected boolean autoCorrectBadQuotes
protected char delimiter
protected java.util.Vector<java.lang.String> fields
protected java.text.DateFormat defaultFormat
protected java.text.DateFormat dateFormatddMMyy
protected java.text.DateFormat dateFormatddMMyyyy
protected java.text.DateFormat dateFormatyyyyMMdd
protected java.text.DateFormat timeFormatHHmmss
protected void parseFields(java.lang.String line)
public int getFieldCount()
public int getInt(int columnNbr) throws java.lang.NumberFormatException
columnNbr
- the number of the column which value should be returnedjava.lang.NumberFormatException
public double getDouble(int columnNbr, boolean commaSeparatesDecimal) throws java.lang.NumberFormatException
columnNbr
- the number of the column which value should be returnedjava.lang.NumberFormatException
public java.lang.String getText(int columnNbr)
columnNbr
- the number of the column which value should be returnedpublic java.sql.Date getDate(int columnNbr)
columnNbr
- the number of the column which value should be returnedpublic java.sql.Time getTime(int columnNbr)
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de