@Override
    public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
                      ParseContext context) throws IOException, SAXException, TikaException {
        DBFReader reader = DBFReader.open(stream);
        DBFFileHeader header = reader.getHeader();
        metadata.set(Metadata.CONTENT_TYPE, header.getVersion().getFullMimeString());

        //insert metadata here
        Calendar lastModified = header.getLastModified();
        if (lastModified != null) {
            metadata.set(TikaCoreProperties.MODIFIED, lastModified);
        }

        //buffer first X rows for charset detection
        List<DBFRow> firstRows = new LinkedList<>();
        DBFRow row = reader.next();
        int i = 0;
        while (row != null && i++ < ROWS_TO_BUFFER_FOR_CHARSET_DETECTION) {
            firstRows.add(row.deepCopy());
            row = reader.next();
        }

        Charset charset = getCharset(firstRows, header);
        metadata.set(Metadata.CONTENT_ENCODING, charset.toString());

        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();
        xhtml.startElement("table");
        xhtml.startElement("thead");
        for (DBFColumnHeader col : header.getCols()) {
            xhtml.startElement("th");
            xhtml.characters(col.getName(charset));
            xhtml.endElement("th");
        }
        xhtml.endElement("thead");

        xhtml.startElement("tbody");

        //now write cached rows
        while (firstRows.size() > 0) {
            DBFRow cachedRow = firstRows.remove(0);
            writeRow(cachedRow, charset, xhtml);
        }

        //now continue with rest
        while (row != null) {
            writeRow(row, charset, xhtml);
            row = reader.next();
        }
        xhtml.endElement("tbody");
        xhtml.endElement("table");
        xhtml.endDocument();
    }
This is a Tika wrapper around the DBFReader.
<p>
This reads many dbase3 file variants (not DBASE 7, yet!).
<p>
It caches the first 10 rows and then runs encoding dectection
on the "character" cells.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/dbf/DBFParser.java