Slide 4.9: Line-by-line anatomy of RecordStore project
  Slide 4.11: Line-by-line anatomy of RecordStore project (cont.)
  Home


Line-by-line Anatomy of RecordStore Project (Cont.)


mHashtable.get( key )
The method public Object java.util.Hashtable.get(Object key) returns the value to which the specified key is mapped in this hashtable. A value null is returned if the key is not mapped to any value in this hashtable.

mHashtable.put( key, value );
The method public Object java.util.Hashtable.put(Object key, Object value) maps the specified key to the specified value in this hashtable.

RecordStore rs = null;
The class javax.microedition.rms.RecordStore representing a record store, which consists of a collection of records and remains persistent across multiple invocations of the MIDlet. Platform is responsible for making its best effort to maintain the integrity of the MIDlet's record stores throughout the normal use of the platform, including reboots, battery changes, etc.

RecordEnumeration re = null;
The interface javax.microedition.rms.RecordEnumeration represents a bidirectional record store Record enumerator. The RecordEnumeration logically maintains a sequence of the recordId's of the records in a record store. The enumerator will iterate over all of the records in an order determined by an optional record comparator. rs = RecordStore.openRecordStore( mRecordStoreName, true );
The method public static RecordStore openRecordStore(String recordStoreName, boolean createIfNecessary) opens (and possibly create) a record store associated with the given MIDlet suite. If this method is called by a MIDlet when the record store is already open by a MIDlet in the MIDlet suite, this method returns a reference to the same RecordStore object.