|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.relique.jdbc.csv.CsvWriter
This class is a helper class that handles the reading and parsing of data from a .csv file.
Constructor Summary | |
CsvWriter(java.lang.String fileName)
Constructor for the CsvReader object |
|
CsvWriter(java.lang.String fileName,
char separator)
Insert the method's description here. |
Method Summary | |
void |
close()
Description of the Method |
protected boolean |
createTable(java.lang.String[] colNames,
java.lang.String table)
|
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.lang.String |
getTableName()
|
protected boolean |
newLine(java.lang.String[] colNames,
java.lang.String[] colValues)
|
boolean |
next()
Description of the Method |
protected java.lang.String[] |
parseCsvLine(java.lang.String line)
|
protected boolean |
updateField(java.lang.String[] colNames,
java.lang.String[] colValues,
java.lang.String[] colWhereNames,
java.lang.String[] colWhereValues)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CsvWriter(java.lang.String fileName) throws java.lang.Exception
fileName
- Description of Parameter
java.lang.Exception
- Description of Exceptionpublic CsvWriter(java.lang.String fileName, char separator) throws java.lang.Exception
fileName
- java.lang.Stringseparator
- char
java.lang.Exception
- The exception description.Method Detail |
public java.lang.String[] getColumnNames()
public java.lang.String getTableName()
public java.lang.String getColumn(int columnIndex)
columnIndex
- Description of Parameter
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.io.IOException
java.sql.SQLException
- Description of Exception
java.io.IOException
public void close()
protected java.lang.String[] parseCsvLine(java.lang.String line) throws java.sql.SQLException
java.sql.SQLException
protected boolean newLine(java.lang.String[] colNames, java.lang.String[] colValues) throws java.io.IOException
java.io.IOException
protected boolean createTable(java.lang.String[] colNames, java.lang.String table) throws java.io.IOException
java.io.IOException
protected boolean updateField(java.lang.String[] colNames, java.lang.String[] colValues, java.lang.String[] colWhereNames, java.lang.String[] colWhereValues) throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |