org.dbunit.dataset.csv
Class CsvDataSetWriter

java.lang.Object
  extended byorg.dbunit.dataset.csv.CsvDataSetWriter
All Implemented Interfaces:
IDataSetConsumer

public class CsvDataSetWriter
extends java.lang.Object
implements IDataSetConsumer

Since:
24-set-2003 15.27.05
Version:
$Revision: 1.3 $
Author:
fede

Constructor Summary
CsvDataSetWriter(java.io.File theDirectory)
           
CsvDataSetWriter(java.lang.String theDirectory)
           
 
Method Summary
 void endDataSet()
          Receive notification of the end of a dataset.
 void endTable()
          Receive notification of the end of a table.
protected static java.lang.String escape(java.lang.String stringValue)
           
protected  void finalize()
           
 java.lang.String getTheDirectory()
           
 java.io.Writer getWriter()
           
 void row(java.lang.Object[] values)
          Receive notification of a table row.
 void setTheDirectory(java.lang.String theDirectory)
           
 void setWriter(java.io.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, java.io.File dest)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvDataSetWriter

public CsvDataSetWriter(java.lang.String theDirectory)

CsvDataSetWriter

public CsvDataSetWriter(java.io.File theDirectory)
Method Detail

write

public void write(IDataSet dataSet)
           throws DataSetException
Throws:
DataSetException

startDataSet

public void startDataSet()
                  throws DataSetException
Description copied from interface: IDataSetConsumer
Receive notification of the beginning of a dataset. This method is invoked only once, before any other methods in this interface.

Specified by:
startDataSet in interface IDataSetConsumer
Throws:
DataSetException

endDataSet

public void endDataSet()
                throws DataSetException
Description copied from interface: IDataSetConsumer
Receive notification of the end of a dataset. This method is invoked only once, and it will be the last method invoked in this interface.

Specified by:
endDataSet in interface IDataSetConsumer
Throws:
DataSetException

startTable

public void startTable(ITableMetaData metaData)
                throws DataSetException
Description copied from interface: IDataSetConsumer
Receive notification of the beginning of a table. This method is invoked at the beginning of every table in the dataset; there will be a corresponding IDataSetConsumer.endDataSet() event for every startTable event (even when the table is empty).

Specified by:
startTable in interface IDataSetConsumer
Parameters:
metaData - the table metadata
Throws:
DataSetException

endTable

public void endTable()
              throws DataSetException
Description copied from interface: IDataSetConsumer
Receive notification of the end of a table.

Specified by:
endTable in interface IDataSetConsumer
Throws:
DataSetException

row

public void row(java.lang.Object[] values)
         throws DataSetException
Description copied from interface: IDataSetConsumer
Receive notification of a table row. This method is invoked to report each row of a table.

Specified by:
row in interface IDataSetConsumer
Parameters:
values - The row values.
Throws:
DataSetException

escape

protected static java.lang.String escape(java.lang.String stringValue)

getWriter

public java.io.Writer getWriter()

setWriter

public void setWriter(java.io.Writer writer)

getTheDirectory

public java.lang.String getTheDirectory()

setTheDirectory

public void setTheDirectory(java.lang.String theDirectory)

write

public static void write(IDataSet dataset,
                         java.io.File dest)
                  throws DataSetException
Throws:
DataSetException

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable


Copyright © 2002-2004 DbUnit.org. All Rights Reserved.