1 16 package scriptella.driver.csv; 17 18 import scriptella.spi.AbstractScriptellaDriver; 19 import scriptella.spi.Connection; 20 import scriptella.spi.ConnectionParameters; 21 import scriptella.spi.DialectIdentifier; 22 23 30 public class Driver extends AbstractScriptellaDriver { 31 static final DialectIdentifier DIALECT = new DialectIdentifier("CSV", "1.0"); 32 33 public Driver() { 34 try { 35 Class.forName("au.com.bytecode.opencsv.CSVReader"); 36 } catch (ClassNotFoundException e) { 37 throw new CsvProviderException("opencsv library not found on classpath. " + 38 "Check if connection classpath attribute points to opencsv.jar", e); 39 } 40 } 41 42 public Connection connect(ConnectionParameters connectionParameters) { 43 return new CsvConnection(connectionParameters); 44 } 45 } 46 | Popular Tags |