BlackBerry® Java® Development Environment (BlackBerry JDE)
Java® based BlackBerry smartphones can store data in one of the following ways:
Using the Mobile Information Device Profile (MIDP) record stores
Using the BlackBerry Persistence model
Using the FileConnection application programming interface (API)
Storing data on a BlackBerry smartphone will allow the data to persist between instances of the applications and after resetting the BlackBerry smartphone.
Which method to use?
The method of storing data depends on the audience of the application.
If the application is meant to run strictly on the BlackBerry smartphone, use the BlackBerry Persistence model. On the other hand, if the application is portable across other Java 2 Platform, Micro Edition (J2ME) compatible devices, then use the MIDP record store method or the FileConnection API.
The biggest advantage of the PersistentStore class is that it allows storing and reading data as Objects, whereas MIDP record stores and FileConnection methods store data as byte arrays, which need to be parsed by applications to Objects.
For a complete overview on different ways to store persistent data on the BlackBerry smartphone, see the developer video Introduction to Persistence Models on BlackBerry Smartphones.