Search code examples
javaserializationblackberryobject-serialization

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?

Thanks.


Solution

  • 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.