public class CsvDataSetWriter extends Object implements IDataSetConsumer
| Modifier and Type | Field and Description |
|---|---|
static String |
NULL
todo: customizable separators (field, lines), manage the writers opened for each table
|
| Constructor and Description |
|---|
CsvDataSetWriter(File theDirectory) |
CsvDataSetWriter(String theDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
endDataSet()
Receive notification of the end of a dataset.
|
void |
endTable()
Receive notification of the end of a table.
|
protected static String |
escape(String stringValue) |
protected void |
finalize() |
String |
getTheDirectory() |
Writer |
getWriter() |
void |
row(Object[] values)
Receive notification of a table row.
|
void |
setTheDirectory(String theDirectory) |
void |
setWriter(Writer writer) |
void |
startDataSet()
Receive notification of the beginning of a dataset.
|
void |
startTable(ITableMetaData metaData)
Receive notification of the beginning of a table.
|
void |
write(IDataSet dataSet) |
static void |
write(IDataSet dataset,
File dest) |
public static final String NULL
public CsvDataSetWriter(String theDirectory)
public CsvDataSetWriter(File theDirectory)
public void write(IDataSet dataSet) throws DataSetException
DataSetExceptionpublic void startDataSet()
throws DataSetException
IDataSetConsumerstartDataSet in interface IDataSetConsumerDataSetExceptionpublic void endDataSet()
throws DataSetException
IDataSetConsumerendDataSet in interface IDataSetConsumerDataSetExceptionpublic void startTable(ITableMetaData metaData) throws DataSetException
IDataSetConsumerIDataSetConsumer.endDataSet() event for every startTable
event (even when the table is empty).startTable in interface IDataSetConsumermetaData - the table metadataDataSetExceptionpublic void endTable()
throws DataSetException
IDataSetConsumerendTable in interface IDataSetConsumerDataSetExceptionpublic void row(Object[] values) throws DataSetException
IDataSetConsumerrow in interface IDataSetConsumervalues - The row values.DataSetExceptionpublic Writer getWriter()
public void setWriter(Writer writer)
public String getTheDirectory()
public void setTheDirectory(String theDirectory)
public static void write(IDataSet dataset, File dest) throws DataSetException
DataSetExceptionCopyright © 2002-2017. All Rights Reserved.