Motorola C450 Manuale Utente
12
Record Management System
Record Management System
67
12
Record Management System
Overview
The most common mechanism for persistently storing data on a MIDP device is through
RMS. RMS provides the capability to store variable length records on the device. Those
records are accessible to any MIDlet in the MIDlet Suite, but not to MIDlets outside of the
records are accessible to any MIDlet in the MIDlet Suite, but not to MIDlets outside of the
MIDlet Suite. The RMS implementation of the Motorola C370, C450, and C550 series of
handsets is MIDP compliant, so there are no significant additions or changes to the MIDP
specification.
handsets is MIDP compliant, so there are no significant additions or changes to the MIDP
specification.
Class Description
The API for the RecordStore is located in the package
javax.microedition.rms.
Code Examples
The following is a code example to show implementation of opening the
RecordStore
.
If any exception occurs it will be caught.
RecordStore
try {
System.out.println("Opening RecordStore " + rsName + " ...");
//try to open a record Store
recordStore = RecordStore.openRecordStore(rsName, true);
//keep a note for the last modified time for record store
Date d = new Date(recordStore.getLastModified());
System.out.println(recordStore.getName()+"modified last time: " +
System.out.println(recordStore.getName()+"modified last time: " +
d.toString());
}
catch (RecordStoreException rse) {