LGPL page
/ /

DbfEngine Java API

DbfEngine - A Java API to read, write xBase(DBASE, Foxpro dbf files).
Also API allows read memory files (.mem) of Foxpro and may be Clipper. Samples for both operations you may see at DbfEngine javadoc.

This API is pure lightweight library without memory consumption and any third party libraries. There are no java loggers and modern mappers.
The DBF Java API is intended as engine for data exchange purposes.


Engine is very small and fast.
API for reading is made as iterator, API for writing is made in manner as JDBC statement. It is allows to write compact Java code. See code samples below.

Also you can look inside your dbf file by invoking it through command line:

java -jar dbfEngine_bin-1.08.jar your.dbf

The result of parsing dbf header and content will be placed into textual file.


This version was tested under MS Foxpro 2.6 without memo field support.


DbfEngine requires JDK 1.6 or higher.


DbfEngine is issued on under the GNU Lesser General Public License. For further information click here.


You may download DbfEngine 1.08 (2016-OCT-16) version binary code here , source code here and all bundle here
Latest online Javadoc you may see here, version history you may see here.


If this library was useful for your project please publish the link to this page.

If you have any questions or suggestions please do not hesitate to ask me by ask@smart-flex.ru.
DbfEngine - Java API , xBase (DBASE, Foxpro) . API .mem Foxpro Clipper'. .dbf .mem DbfEngine javadoc.

API . . .

API , API jdbc Statement. . .

"" dbf :

java -jar dbfEngine_bin-1.08.jar your.dbf

dbf .

dbf MS Foxpro 2.6 memo.

DbfEngine JDK 1.6 .


1.08 (2016-10-16) , Java , javadoc
Javadoc API , .

, .

public class Fp26Reader {


private static void testRead() {

DbfIterator dbfIterator = DbfEngine.getReader(

Fp26Reader.class.getResourceAsStream("FP_26_SAMPLE.DBF"), null);

while (dbfIterator.hasMoreRecords()) {

DbfRecord dbfRecord = dbfIterator.nextRecord();

String string = dbfRecord.getString("string");

float sumFloat = dbfRecord.getFloat("sum_f");

BigDecimal sumNumeric = dbfRecord.getBigDecimal("sum_n");

boolean bool = dbfRecord.getBoolean("bool_val");

Date date = dbfRecord.getDate("date_val");

System.out.println(string + " " + sumFloat + " " + sumNumeric + " "

+ bool + " " + date);




public static void main(String[] args) {






public class Fp26Writer {


private static void testWrite() {

DbfAppender dbfAppender = DbfEngine.getWriter("WRT_PERSON.DBF", DbfCodePages.Cp866);

DbfColumn dc01 = new DbfColumn("magic", DbfColumnTypes.Logical, 0, 0);

DbfColumn dc02 = new DbfColumn("actor", DbfColumnTypes.Character, 60, 0);

DbfColumn dc03 = new DbfColumn("currdate", DbfColumnTypes.Date, 0, 0);

DbfColumn dc04 = new DbfColumn("hit", DbfColumnTypes.Numeric, 10, 2);

DbfColumn dc05 = new DbfColumn("forever", DbfColumnTypes.Logical, 0, 0);

dbfAppender.defineColumns(dc01,dc02, dc03, dc04, dc05);

DbfStatement statement = dbfAppender.getStatement();

statement.setString("actor", "Chuck Norris");

statement.setDate("currdate", new Date());

statement.setBigDecimal("hit", new BigDecimal("500.5"));



statement.setBoolean("magic", Boolean.TRUE);

statement.setString("actor", "Bruce Lee");

statement.setBigDecimal("hit", new BigDecimal("1000.10"));

statement.setBoolean("forever", Boolean.TRUE);




public static void main(String[] args) {





since 1995
© 2000