public class DbfFileReader extends Object implements Closeable
Constructor and Description |
---|
DbfFileReader(File file)
Construct a DbfFileReader from the specified file
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
DbfField |
getFieldByName(String name)
Get the field matching the specified name
|
List<DbfField> |
getFields()
Get a safe copy of a list of the fields specified in the DBF file.
|
int |
getRecordCount()
Get the number of records in the DBF file
|
void |
readField(int recordNumber,
DbfField field)
Read the content of the file into the field object
|
public DbfFileReader(File file) throws IOException
file
- a valid file reference to a .dbf fileIOException
- in the event of an unrecoverable I/O conditionpublic int getRecordCount()
public List<DbfField> getFields()
public DbfField getFieldByName(String name)
name
- a valid stringpublic void readField(int recordNumber, DbfField field) throws IOException
recordNumber
- a valid record in the range 1 to record-count.field
- a valid field obtained from the DbfFileReader instance and
used to hold the data read from the fileIOException
- in the event of an unrecoverable I/O condition.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2021. All rights reserved.