How to write a Hastable or an Object to the file on Blackberry
I just learned that Blackberry does not support implementing Serializable. So is there any way to write an object (or Hashtable) to a file?
开发者_如何学CThanks.
If you just want to store the data, you can use the PersistentStore to store the item and is the closest thing to Serializable you'll find. Note that this method requires the application to be signed.
Otherwise, you can write the data to a file on the device.
The linked document also shows how to store it in SQLite or use the two other data stores available.
Which file? If you're storing some sort of settings object for your app, take a look at the PersistentStore API.
精彩评论