Hello, I'm wanting to read in a flat text file and then store this information in memory while my app runs. Everyonce in a while I will need to re-write this data back onto the disk. I am not concerned about reading and writing the file(this seems pretty straight forward) but rather how to store this data in a way that is efficient and retrival time is quick. Also, the first and second column would always be different and I would need to be able to get one from the other. The file might look something like this smith 1234.12345.12345 workerB johnson 1223.12121.12122 workerC There would be approx. 5000 entries like this. Hopefully this is enough information, and again I am looking for the best data structure to use with Java(I think in C a tree structure was used in this case). But any hints would be welcome. Thanks, Bill
Joined: Apr 06, 2001
I think reading the data is pretty much the same, one line at a time. Retrieving is another matter. I also think tree is excellent, almost 1/2 the time to search and retrieve compared to linked list.
Joined: Mar 29, 2001
Thanks for the reply. Does Java have built in classes for trees? If not is there a class simliar to trees? Bill