It’s almost certain every Java programmer out there had to deal with handling of delimited or fixed length flat files at one moment of his career.
I have just created a library that makes it easier to work with that: JFileHelpers. It uses the awesomeness of Java annotations to allow you to handle flat files with minimum changed to existing code. It’s a port of the awesome FileHelpers C# library, by Marcos Meli.
We are also looking for developers who would be interested on joining the team. If you’re not available, you can also help by using the library, and giving feedback on features you’d like to see implemented.
Hope you like it, I would really like to hear your opinions on the library.
June 9, 2008 at 7:27 pm
First of all great work on JFileHelpers!
I know you have asked me several times if I would start committing on jfilehelpers instead of continuing the development on http://fixedformat4j.ancientprogramming.com. I understand that it would be the most reasonable to join forces, but I don’t have that much time on my hand at the moment.
http://fixedformat4j.ancientprogramming.com focuses on reading and writing fixedformatted flatfiles and will probably not go in the direction of handling delimited files like csv format etc.
We uses fixedformat4j on my current project to read and write rather complex and large fixedformatted files where each line doesn’t represent the same kind of data – like a customer or so.
As I see the sourcecode of jfilehelper it is create if you need to export, say, an array of customers to text format, but doesn’t help me if each line is completely different from each other?
This is the direction I would like to take fixedformat4j – help parsing and creating complex data like that – targeting projects that needs to integrate with legacy applications that uses EDI or some other flat file format as the protocol.
June 17, 2008 at 9:00 pm
How about very large filesets?
I see you read the entire file and create the list with the results.
Is there a way to read portions of the file, for the sake of memory consumption?
June 17, 2008 at 9:10 pm
As mentioned in private e-mail to Andries, our latest version (not stable yet) allows you to work with the file using an Iterator. If anyone have any questions on that, drop me a note here and I’ll elaborate. Thanks!