This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 9168

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
It's not a secret anymore!