Hash Tables & Files

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2008
Posts: 31
Reputation: scream2ice is an unknown quantity at this point 
Solved Threads: 0
scream2ice scream2ice is offline Offline
Light Poster

Hash Tables & Files

 
0
  #1
Jun 14th, 2009
hi everyone
Im working on a program that includes hash tables and files.
What i'm doing is that I save the information (Name, Student ID, Address, Phone No.) of some students in a text file.
I use a hash table to work on the students' information.
Things like showing the information of a particular student or deleting their info or.....
My question is, I have used a usual implementaion of HashTable (with map) so far....but i feel that it wouldn't work
Do you think that I should use SerializableHash to be able to edit the contents of the text file?
I'm a bit lost here......How can i be able to access the contents of the file and have them as Hash Table?
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1,015
Reputation: JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice 
Solved Threads: 150
JamesCherrill JamesCherrill is online now Online
Veteran Poster

Re: Hash Tables & Files

 
0
  #2
Jun 14th, 2009
You'll probably have to read the file into the table when the app starts, and re-write the edited data back at the end. You can do direct-access in-place updates of a file, but it's not easy or particularly safe - not recommended.
Where does the map come into it?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC