Name
RecordStore
Synopsis
A RecordStore provides persistent storage for a collection
of records. The means by which the records are stored is device-dependent. A
RecordStore may be implemented using a native feature of the
host operating system; therefore the data that it contains might be visible
or subject to modification by native applications. The programming interface
provided by the RecordStore class is intended to be simple
enough that it can be implemented across a variety of different platforms.
A RecordStore does not expose the details of the underlying
storage mechanism.
A RecordStore is identified by its name, which is a string
of up to 32 Unicode characters. RecordStores can be shared
by all MIDlets in the same MIDlet suite; hence, the name must be unique within
the MIDlet suite. RecordStores belonging to one suite are
not visible to MIDlets in other suites as the MIDlet suite itself is
implicitly part of the RecordStore name. As a result,
MIDlets in different suites can create stores with the same name without
conflict.
The static openRecordStore() method opens an existing
RecordStore given its name. The createIfNecessary
argument should be set to true to create the RecordStore
if it does not already exist. The openRecordStore() method may be
called several times within the same MIDlet and will always return the same
RecordStore instance given the same name. When a MIDlet no longer needs to access a
RecordStore, it should call the closeRecordStore() method. Note that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access