开发者

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?

开发者_如何学C

Thanks.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜