| Slide 4.12: Line-by-line anatomy of RecordStore project (cont.) Slide 5.1: Network connection Home |   | 
RecordStore Project (Cont.)
 
  rs.deleteRecord( id );
 
recordId for this record is NOT reused.
recordId — the ID of the record to delete
  Enumeration  keys = mHashtable.keys( );
 
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( )
 
  keys.nextElement( )
 
  rs.addRecord( raw, 0, raw.length );
 
recordId for this new record is returned. 
It is a blocking atomic operation. 
The record is written to persistent storage before the method returns.
data — the data to be stored in this record.
  If the record is to have zero-length data (no data), this parameter may be null.
 offset — the index into the data buffer of the first byte for this record.
 numBytes — the number of bytes of the data buffer to use for this record.