public class DBFDriver extends Object implements FileDriver
| Constructor and Description |
|---|
DBFDriver() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the file, free resources.
|
DbaseFileHeader |
getDbaseFileHeader() |
File |
getDbfFile() |
int |
getFieldCount() |
Object[] |
getRow(long rowId) |
long |
getRowCount() |
void |
initDriver(File dbfFile,
DbaseFileHeader dbaseHeader) |
void |
initDriverFromFile(File dbfFile)
Init file header for DBF File
|
void |
initDriverFromFile(File dbfFile,
String forceEncoding)
Init file header for DBF File
|
void |
insertRow(Object[] values)
Write a row
|
public void initDriverFromFile(File dbfFile) throws IOException
dbfFile - DBF File pathIOExceptionpublic void initDriverFromFile(File dbfFile, String forceEncoding) throws IOException
dbfFile - DBF File pathforceEncoding - File encoding to use, null will use the file encoding provided in the file headerIOExceptionpublic void initDriver(File dbfFile, DbaseFileHeader dbaseHeader) throws IOException
IOExceptionpublic void insertRow(Object[] values) throws IOException
insertRow in interface FileDrivervalues - Content, must be of the same type as declared in the headerIOExceptionpublic File getDbfFile()
public DbaseFileHeader getDbaseFileHeader()
public void close()
throws IOException
FileDriverclose in interface FileDriverIOExceptionpublic long getRowCount()
getRowCount in interface FileDriverpublic int getFieldCount()
public Object[] getRow(long rowId) throws IOException
getRow in interface FileDriverrowId - Row index [0-getRowCount()[IOException - Read errorCopyright © 2018 CNRS. All rights reserved.