Help Center

Local Navigation

Retrieve all records from a record store

  1. Import the javax.microedition.rms.RecordStore class.
  2. Import the following interfaces:
    • javax.microedition.rms.RecordEnumeration
    • javax.microedition.rms.RecordFilter
    • javax.microedition.rms.RecordComparator
  3. Invoke openRecordStore().
  4. Invoke enumerateRecords(). Pass the following parameters:
    • filter: specifies a RecordFilter object to retrieve a subset of record store records (if null, the method returns all records)
    • comparator: specifies a RecordComparator object to determine the order in which the method returns the records (if null, the method returns the records in any order)
    • keepUpdated: determines if the method keeps the enumeration current with the changes to the record store
    RecordStore store = RecordStore.openRecordStore("Contacts", false);
    RecordEnumeration e = store.enumerateRecords(null, null, false);

Index


Was this information helpful? Send us your comments.