wood burning stoves*
The moose likes I/O and Streams and the fly likes writing hashtable to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "writing hashtable to a file" Watch "writing hashtable to a file" New topic
Author

writing hashtable to a file

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 477

hi pals

i need to write values of hashtable into a file on the hard disk & take the containts of the file & put it into DB..
Anyone can help me?



Thanks,
Sherif
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Use Serialization


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Why the intermetidate step? Could you not just write the contents of your Hashtable to the database directly via JDBC?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 477

because i need to archive it after that.. but the questiion now how i can do all of this coding !!
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

just go through the examples of I/O, Hashtable API and JDBC program.

Try googling for Sample Programs and then combine those to suit your need.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: writing hashtable to a file
 
Similar Threads
hashtable to file
How can i serialize a hashtable which each of entry is another hashtable?
how to write the hashtable to a file
Collections
how to persist the contents of HashTable ??