For data storage and retrieval, MIDP 2.0 features a Record Management System (RMS) that is modeled after a simple record oriented database. A record store is a collection of data that remains persistent across multiple invocations of a MIDlet.
MIDlets are allowed to create multiple record stores, as long as the record stores are given different names. The names are case sensitive, and have a maximum of 32 characters. MIDlets can access record stores relating to other MIDlets within the same MIDlet suite. Also, if explicit permission is given, MIDlets within other suites can also access the record store.
A record store is always stored on the same drive as the MIDlet itself
(phone memory or memory card). The size of record store database is limited
only by free disk space. A RecordStoreFullException
is
thrown when free space runs out.
Note: From S60 3rd Edition FP 2 onwards, The maximum size of the record store is 8 MB.
Each record in a record store consists of a single binary field of variable size. The responsibility for interpreting the contents of a record falls entirely on the MIDlet. RMS only provides the storage and a unique identifier.
The following methods do not return until all listeners have been called:
addRecord()
setRecord()
deleteRecord()
As implied above, a blocking listener causes blocking of thread that asked for the record modification. The implementation does not, however, block other threads accessing the record store (unless the accesses lead to same blocking condition of a listener.)
For more information, see the following sections:
Storing application settings in Java ME example MIDlet in Forum Nokia wiki