Class DBFDriver
java.lang.Object
org.h2gis.functions.io.dbf.internal.DBFDriver
- All Implemented Interfaces:
org.h2gis.api.FileDriver
Manage DBFReader and DBFWriter
- Author:
- Nicolas Fortin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Get the file readerintgetEstimatedRowSize(long rowId) org.h2.value.ValuegetField(long rowId, int columnId) intlongvoidinitDriver(File dbfFile, DbaseFileHeader dbaseHeader) voidinitDriverFromFile(File dbfFile) Init file header for DBF FilevoidinitDriverFromFile(File dbfFile, String forceEncoding) Init file header for DBF FilevoidWrite a row
-
Field Details
-
dbaseFileReader
-
dbaseFileWriter
-
-
Constructor Details
-
DBFDriver
public DBFDriver()
-
-
Method Details
-
initDriverFromFile
Init file header for DBF File- Parameters:
dbfFile- DBF File path- Throws:
IOException
-
initDriverFromFile
Init file header for DBF File- Parameters:
dbfFile- DBF File pathforceEncoding- File encoding to use, null will use the file encoding provided in the file header- Throws:
IOException
-
initDriver
- Throws:
IOException
-
insertRow
Write a row- Specified by:
insertRowin interfaceorg.h2gis.api.FileDriver- Parameters:
values- Content, must be of the same type as declared in the header- Throws:
IOException
-
getDbfFile
- Returns:
- DBF File path
-
getDbaseFileHeader
- Returns:
- The DBF file header
-
close
- Specified by:
closein interfaceorg.h2gis.api.FileDriver- Throws:
IOException
-
getRowCount
public long getRowCount()- Specified by:
getRowCountin interfaceorg.h2gis.api.FileDriver
-
getFieldCount
public int getFieldCount()- Specified by:
getFieldCountin interfaceorg.h2gis.api.FileDriver- Returns:
- Column count
-
getEstimatedRowSize
public int getEstimatedRowSize(long rowId) - Specified by:
getEstimatedRowSizein interfaceorg.h2gis.api.FileDriver
-
getField
- Specified by:
getFieldin interfaceorg.h2gis.api.FileDriver- Throws:
IOException
-
getDbaseFileReader
Get the file reader- Returns:
-