Download the jar rack package for DBF first Http://pan.baidu.com/s/1jIqVIcA
InputStream FIS = null;
String sresult = "";
try {
Read the input stream of a file
FIS = new FileInputStream (path);
Initializes an Dbfreader instance based on the input stream to read the DBF file information
Dbfreader reader = new Dbfreader (FIS);
Call Dbfreader to get the number of fields in the path file for the instance method
int fieldscount = Reader.getfieldcount ();
Remove field information
for (int i = 0; i < Fieldscount; i++) {
Dbffield field = Reader.getfield (i);
System.out.println (Field.getname ());
}
Object[] rowvalues;
Strips are taken out of the path file.
while ((rowvalues = Reader.nextrecord ()) = null) {
for (int i = 0; i < rowvalues.length; i++) {
System.out.println (Rowvalues[i]);
}
}
} catch (Exception e) {
E.printstacktrace ();
} finally {
try {
Fis.close ();
} catch (Exception e) {
}
}
Parsing methods for DBF files