dcsimg
Can java save a type Hashtabe for use next time the program is run?
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mike_Godfrey
Posted On:   Monday, January 14, 2002 07:39 AM

Hello,

I'm wondering if Java has the ability to save a Hashtable and be used by other programs.

Would it be possible to save the hashtable to a disk?

I guess this would be like PERL's DBM files.

thanks,

-Mike

Re: Can java save a type Hashtabe for use next time the program is run?

Posted By:   Mike_Godfrey  
Posted On:   Tuesday, January 15, 2002 08:10 AM

Thank You for the help.

I serialized the Hashtable and this does what I need to do.

-Mike

Re: Can java save a type Hashtabe for use next time the program is run?

Posted By:   John_Zukowski  
Posted On:   Tuesday, January 15, 2002 08:08 AM

Assuming the contents of the Hashtable are serializable, you can serialize the Hashtable.

Re: Can java save a type Hashtabe for use next time the program is run?

Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, January 14, 2002 07:47 AM

Mike,

Not directly, but through the Serializable interface. Hashtable, like other classes that belongs to the Collecion API, implements the Serializable interface.

If the objects you insert inside the Hashtable implements the Serializable interface, you should be able to achieve your goal.
About | Sitemap | Contact