org.dbunit.dataset.csv
Class CsvProducer

java.lang.Object
  extended by org.dbunit.dataset.csv.CsvProducer
All Implemented Interfaces:
IDataSetProducer

public class CsvProducer
extends Object
implements IDataSetProducer

Since:
1.5 (Sep 17, 2003)
Version:
$Revision: 823 $ $Date: 2008-10-05 12:15:40 +0200 (Sun, 05 Oct 2008) $
Author:
Federico Spinazzi, Last changed by: $Author: gommma $

Constructor Summary
CsvProducer(File theDirectory)
           
CsvProducer(String theDirectory)
           
 
Method Summary
static List getTables(URL base, String tableList)
          Get a list of tables that this producer will create
 void produce()
          Process this dataset source.
 void setConsumer(IDataSetConsumer consumer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvProducer

public CsvProducer(String theDirectory)

CsvProducer

public CsvProducer(File theDirectory)
Method Detail

setConsumer

public void setConsumer(IDataSetConsumer consumer)
                 throws DataSetException
Specified by:
setConsumer in interface IDataSetProducer
Throws:
DataSetException

produce

public void produce()
             throws DataSetException
Description copied from interface: IDataSetProducer
Process this dataset source. During the processing, the IDataSetProducer will provide information about the dataset through the specified event listener.

This method is synchronous: it will not return until processing has ended. If a client application wants to terminate parsing early, it should throw an exception from the listener.

Specified by:
produce in interface IDataSetProducer
Throws:
DataSetException

getTables

public static List getTables(URL base,
                             String tableList)
                      throws IOException
Get a list of tables that this producer will create

Returns:
a list of Strings, where each item is a CSV file relative to the base URL
Throws:
IOException - when IO on the base URL has issues.


Copyright © 2002-2012. All Rights Reserved.