June 2002
Intermediate to advanced
504 pages
10h 10m
English
Beneath the DayLog class for storing the log of a single day, we need another class to store all the DayLogs persistently. The LogStorage class uses a record store for that purpose.
In the constructor, the record store with the name "BloodSugarLog" is opened and assigned to the days object variable:
import javax.microedition.rms.*;
import java.util.*;
import java.io.*;
import java.util.*;
public class LogStorage {
RecordStore days;
public LogStorage () throws RecordStoreException {
days = RecordStore.openRecordStore ("BloodSugarLog", true);
}
}
The most important functionality of the persistent storage is to provide efficient access to the day log of a specific date. If the logs are stored and put in ...
Read now
Unlock full access