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. RecordStore
s can be shared
by all MIDlets in the same MIDlet suite; hence, the name must be unique within
the MIDlet suite. RecordStore
s 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 ...
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.