|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.relique.jdbc.csv.CsvReader
This class is a helper class that handles the reading and parsing of data from a .csv file.
Constructor Summary | |
CsvReader(java.lang.String fileName,
char separator,
boolean suppressHeaders,
java.lang.String charset,
java.lang.String extension,
java.lang.String lineBreakEscape,
java.lang.String carriageReturnEscape,
boolean trimString)
|
Method Summary | |
void |
close()
Description of the Method |
java.lang.String |
getColumn(int columnIndex)
Get the value of the column at the specified index. |
java.lang.String |
getColumn(java.lang.String columnName)
Get value from column at specified name. |
java.lang.String[] |
getColumnNames()
Gets the columnNames attribute of the CsvReader object |
java.util.Map |
getColumnTypes()
|
java.lang.String |
getTableName()
|
boolean |
next()
Description of the Method |
protected java.lang.String[] |
parseCsvLine(java.lang.String line)
Parse csv line with columnTypes. |
protected java.lang.String[] |
parseCsvLineAsHeader(java.lang.String line)
Parse csv line, whithout columnTypes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CsvReader(java.lang.String fileName, char separator, boolean suppressHeaders, java.lang.String charset, java.lang.String extension, java.lang.String lineBreakEscape, java.lang.String carriageReturnEscape, boolean trimString) throws java.lang.Exception
fileName
- separator
- suppressHeaders
- charset
- extension
-
java.lang.Exception
Method Detail |
public java.lang.String[] getColumnNames()
public java.util.Map getColumnTypes()
public java.lang.String getTableName()
public java.lang.String getColumn(int columnIndex) throws java.sql.SQLException
columnIndex
- Description of Parameter
java.sql.SQLException
public java.lang.String getColumn(java.lang.String columnName) throws java.sql.SQLException
columnName
- Description of Parameter
java.sql.SQLException
- Description of Exceptionpublic boolean next() throws java.sql.SQLException
java.sql.SQLException
- Description of Exceptionpublic void close()
protected java.lang.String[] parseCsvLine(java.lang.String line) throws java.sql.SQLException
line
-
java.sql.SQLException
protected java.lang.String[] parseCsvLineAsHeader(java.lang.String line) throws java.sql.SQLException
line
-
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |