Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading memo fields #26

Open
epaulferrer opened this issue Sep 26, 2016 · 1 comment
Open

Error reading memo fields #26

epaulferrer opened this issue Sep 26, 2016 · 1 comment

Comments

@epaulferrer
Copy link

epaulferrer commented Sep 26, 2016

Exception in thread "Main Thread" java.io.IOException: Resetting to invalid mark
at java.io.BufferedInputStream.reset(BufferedInputStream.java:416)
at net.iryndin.jdbf.reader.MemoReader.read(MemoReader.java:57)
at net.iryndin.jdbf.core.DbfRecord.getMemoAsString(DbfRecord.java:162)
at net.iryndin.jdbf.core.DbfRecord.getMemoAsString(DbfRecord.java:170)
at TestMain.test(TestMain.java:53)
at TestMain.main(TestMain.java:29)

         dbf = new FileInputStream("/home/paul/Desktop/DBF/file.DBF");
         InputStream memo = new FileInputStream("/home/paul/Desktop/DBF/file.FPT");
        DbfRecord rec;
        DbfReader reader = new DbfReader(dbf, memo);
        DbfMetadata meta = reader.getMetadata();

        System.out.println("Read DBF Metadata: " + meta);
        int recCounter = 0;
        while ((rec = reader.read()) != null) {
            rec.setStringCharset(stringCharset);
            System.out.println(rec.toMap());
            System.out.println(rec.getMemoAsString("CL_SERVCOM"));
@iryndin
Copy link
Owner

iryndin commented Jan 19, 2017

@epaulferrer could you please provide DBF file for investigation? Or, if you already have investigated the file and have made a fix, could you provide pull request for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants