Slide 4.12: Line-by-line anatomy of RecordStore project (cont.)
  Slide 5.1: Network connection
  Home


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


rs.deleteRecord( id );
The method public void javax.microedition.rms.RecordStore.deleteRecord(int recordId) deletes the record from the record store. The recordId for this record is NOT reused.
Enumeration keys = mHashtable.keys( );
The method public Enumeration java.util.Hashtable.keys returns an java.util.Enumeration of the keys in this hashtable. An object that implements the Enumeration interface generates a series of elements, one at a time. Successive calls to the nextElement method return successive elements of the series.

keys.hasMoreElements( )
The method public boolean java.util.Enumeration.hasMoreElements( ) tests if this enumeration contains more elements.

keys.nextElement( )
The method public Object java.util.Enumeration.nextElement( ) returns the next element of this enumeration if this enumeration object has at least one more element to provide.

rs.addRecord( raw, 0, raw.length );
The method public int javax.microedition.rms.RecordStore.addRecord(byte[] data, int offset, int numBytes) adds a new record to the record store. The recordId for this new record is returned. It is a blocking atomic operation. The record is written to persistent storage before the method returns.