| java.lang.Object com.quantum.csv.wizard.ConverterCSV
ConverterCSV | public class ConverterCSV (Code) | | Converts data from a SQLVirtualResultSet to a CSV (Comma Separated Values)
file. This file can be a regular text file or an entry in a Zip file.
author: Julen |
Method Summary | |
public void | convert(Writer writer, Entity entity, boolean headerRow, char columnSeparator) Main convert function for regular files. | public void | convert(ZipOutputStream zipOS, Entity entity, boolean headerRow, char columnSeparator) Main convert function for Zip files. | public void | convert(BufferedReader stream, Entity entity, char endOfColumn, boolean hasHeaderRow, boolean ignoreHeader, String endOfLine) | public static String | filter(String[] columnValues, char columnSeparator) | public long | getNumBadInserts() | public long | getNumGoodInserts() |
convert | public void convert(Writer writer, Entity entity, boolean headerRow, char columnSeparator) throws IOException, NotConnectedException, SQLException(Code) | | Main convert function for regular files. It writes from a database to a
CSV file.
Parameters: writer - A writer to the file where to write the CSV lines Parameters: entity - The entity source of the data Parameters: headerRow - true if a header row with the column names is to be written throws: IOException - throws: NotConnectedException - throws: SQLException - |
convert | public void convert(ZipOutputStream zipOS, Entity entity, boolean headerRow, char columnSeparator) throws IOException, NotConnectedException, SQLException(Code) | | Main convert function for Zip files.
Parameters: zipOS - A writer to the zip file where to write the CSV lines Parameters: entity - The entity source of the data Parameters: headerRow - true if a header row with the column names is to be written throws: IOException - throws: NotConnectedException - throws: SQLException - |
convert | public void convert(BufferedReader stream, Entity entity, char endOfColumn, boolean hasHeaderRow, boolean ignoreHeader, String endOfLine)(Code) | | Parameters: stream - Parameters: entity - Parameters: b - |
filter | public static String filter(String[] columnValues, char columnSeparator)(Code) | | Parameters: columnValues - The String values joined in a String, surrounded by commas ifneeded, separated by the COLUMN_SEPARATOR character |
getNumBadInserts | public long getNumBadInserts()(Code) | | |
getNumGoodInserts | public long getNumGoodInserts()(Code) | | |
|
|