jferard / jxbase Goto Github PK
View Code? Open in Web Editor NEWJxBase is a fork from [jdbf](https://github.com/iryndin/jdbf), a Java utility to read/write DBF files
License: Apache License 2.0
JxBase is a fork from [jdbf](https://github.com/iryndin/jdbf), a Java utility to read/write DBF files
License: Apache License 2.0
If you try to delete *.dbf and *.dbt file, after line dbfWriter.close() in WriterWithMemoIT , you will find that you can not delete *.dbt file, "because it used by another process". As i can see it happens because MemoWriter is not closed during dbfWriter.close()
When write data to new dbf-table with memo fields, memo fields in all records have same value from last record.
And dbt file is small, and you can see in it - only one memo field value from last record.
For writer using various types: XBaseFileTypeEnum.dBASE3plusMemo, XBaseFileTypeEnum.dBASE4Memo, XBaseFileTypeEnum.dBASE7Memo
t123.zip
Original data:
Original.pdf
Test for problem:
MemoTest.zip
Before:
final int memoRecordLength =
BytesUtils.makeLEInt(recordHeaderBytes[4], recordHeaderBytes[5], recordHeaderBytes[6],
recordHeaderBytes[7]);
After:
final int memoRecordLength = BytesUtils.extractLEInt(recordHeaderBytes, 4, 4);
I gave a try to Mockito, but I'm not convinced.
And check the length in other flavours.
The current design is poor: MemoAccess holds a reference on the memo handle. Should be removed.
See: http://www.dfpug.de/loseblattsammlung%5Cmigration%5Cwhitepapers/DDIntro.htm
File extensions are DBC, DCX and DCT. Should be handled like regular files.
ReaderWithMemoIT
ReaderIT
In com.github.jferard.jxbase.tool.DatabaseLoader
.
static final void main(...) {
// directory or file, connection string or file (sqlite)
}
Before:
if (DB4Utils.MEMO_FIELD_RESERVED_BYTES[0]` != recordHeaderBytes[0] ||
DB4Utils.MEMO_FIELD_RESERVED_BYTES[1] != recordHeaderBytes[1] ||
DB4Utils.MEMO_FIELD_RESERVED_BYTES[2] != recordHeaderBytes[2] ||
DB4Utils.MEMO_FIELD_RESERVED_BYTES[3] != recordHeaderBytes[3]) {
After:
if (BytesUtils.equals(MEMO_FIELD_RESERVED_BYTES, 0, recordHeaderBytes, 0, 4)) {
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.