public class DBFUtils
extends java.lang.Object
Constructor and Description |
---|
DBFUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
getAttributeNames(java.io.File dbfFile) |
static java.lang.Object[][] |
getDBFData(java.io.File dbfFile,
java.lang.String[] fieldNames) |
static boolean |
isColumnUnique(java.io.File[] dbfFiles,
java.lang.String[] columnNames)
Tests a combined column for uniqueness across several files
|
static void |
storeAttributes(java.io.File[] dbfFiles,
java.sql.Connection conn,
java.lang.String sqlSchema,
java.lang.String sqlTable,
boolean overwriteTables,
java.lang.String[] nullValues) |
public static java.util.List<java.lang.String> getAttributeNames(java.io.File dbfFile) throws java.io.IOException
dbfFile
- A DBF filejava.io.IOException
public static boolean isColumnUnique(java.io.File[] dbfFiles, java.lang.String[] columnNames) throws java.io.IOException
dbfFiles
- columnNames
- java.io.IOException
public static java.lang.Object[][] getDBFData(java.io.File dbfFile, java.lang.String[] fieldNames) throws java.io.IOException
dbfFile
- A DBF filefieldNames
- A list of field names to retrieve, or null for all columnsjava.io.IOException
public static void storeAttributes(java.io.File[] dbfFiles, java.sql.Connection conn, java.lang.String sqlSchema, java.lang.String sqlTable, boolean overwriteTables, java.lang.String[] nullValues) throws java.io.IOException, java.sql.SQLException
dbfFiles
- A list of DBF files to mergeconn
- a database connectionsqlSchema
- schema to store tablesqlTable
- table name to store dataoverwriteTables
- Set this to true to overwrite an existing SQL table.nullValues
- A list of Strings to interpret as null values.IOException,SQLException
java.io.IOException
java.sql.SQLException