aspose file tools*
The moose likes JDBC and the fly likes Creating a flat file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Creating a flat file" Watch "Creating a flat file" New topic

Creating a flat file

Al Kaiser
Ranch Hand

Joined: Nov 20, 2003
Posts: 35
How can I create a flat file as opposed to database and use that file to store and retrieve information?
Joe Ess

Joined: Oct 29, 2001
Posts: 8996

That can be as simple as writing out your data as a text or binary file. If you want to get fancy or read the data in Excel you could use comma or tabs to seperate the fields. You can get as complex as you want. I've used RandomAccessFile to store data in fixed records and used an "id" which was the offset of the record in the file. Makes for very fast access.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Creating a flat file