Slide 4.11: Line-by-line anatomy of RecordStore project (cont.) Slide 4.13: Line-by-line anatomy of RecordStore project (cont.) Home |
RecordStore
Project (Cont.)
byte[ ] raw = re.nextRecord( );
re.destroy( );
RecordEnumeration
.
MIDlets should call this method when they are done using a RecordEnumeration
.
If a MIDlet tries to use a RecordEnumeration
after this method has been called, it will throw a IllegalStateException
.
rs.closeRecordStore( );
closeRecordStore( )
is called as many times as openRecordStore( )
was called.
In other words, the MIDlet needs to make a balanced number of close calls as open calls before the record store is closed.
RecordStoreNotOpenException
is threw if MIDlet attempts to perform operations on the RecordStore
object after it has been closed.
int id = re.nextRecordId( );
recordId
of the next record in this enumeration, where next
is defined by the comparator and/or filter supplied in the constructor of this enumerator.