Package | Description |
---|---|
javax.microedition.rms |
[OPTIONAL] Mechanism for applications to persistently store data and later
retrieve it.
|
Modifier and Type | Method and Description |
---|---|
int |
RecordStore.addRecord(byte[] data,
int offset,
int numBytes)
Adds a new record to the record store, and returns the
recordId
for this new record. |
int |
RecordStore.addRecord(byte[] data,
int offset,
int numBytes,
int tag)
Adds a new record to the record store, and associates the record with the
given
tag . |
void |
RecordStore.closeRecordStore()
This method is called when the application requests to have the
record store closed.
|
void |
RecordStore.deleteRecord(int recordId)
The record is deleted from the record store.
|
RecordEnumeration |
RecordStore.enumerateRecords(RecordFilter filter,
RecordComparator comparator,
boolean keepUpdated)
Returns an enumeration for traversing a set of records in the
record store in an optionally specified order.
|
RecordEnumeration |
RecordStore.enumerateRecords(RecordFilter filter,
RecordComparator comparator,
boolean keepUpdated,
int[] tags)
Returns an enumeration for traversing a set of records in the
record store in an optionally specified order.
|
int |
RecordStoreInfo.getAuthMode()
Return the authorization mode that was set when the
RecordStore
associated with this RecordStoreInfo instance was created. |
long |
RecordStore.getLastModified()
Returns the last time the record store was modified, in the format used
by
System.currentTimeMillis() . |
java.lang.String |
RecordStore.getName()
Returns the name of this RecordStore.
|
int |
RecordStore.getNextRecordID()
Returns the recordId of the next record to be added to the
record store.
|
int |
RecordStore.getNumRecords()
Returns the number of records currently in the record store.
|
byte[] |
RecordStore.getRecord(int recordId)
Returns a copy of the data stored in the given record.
|
int |
RecordStore.getRecord(int recordId,
byte[] buffer,
int offset)
Returns the data stored in the given record.
|
int |
RecordStore.getRecordSize(int recordId)
Returns the size (in bytes) of the application data available
in the given record.
|
RecordStoreInfo |
RecordStore.getRecordStoreInfo()
Gets a
RecordStoreInfo instance for this RecordStore . |
long |
RecordStoreInfo.getSize()
Returns the amount of space, in bytes, that the record store occupies.
|
int |
RecordStore.getSize()
Deprecated.
Previously calls to
getSize() could not
accomodate a RecordStore larger than Integer.MAX-VALUE
. To query the size of a RecordStore use
RecordStore.getRecordStoreInfo() and RecordStoreInfo.getSize() ,
which returns a long and can accomodate RecordStore sizes
up to Long.MAX_VALUE .
Returns the amount of space, in bytes, that the record store
occupies. The size returned includes any overhead associated
with the implementation, such as the data structures
used to hold the state of the record store, tags etc. |
long |
RecordStoreInfo.getSizeAvailable()
Returns the amount of additional room (in bytes) available for this
record store to grow.
|
int |
RecordStore.getSizeAvailable()
Deprecated.
Previously calls to
getSize() could not
accomodate a RecordStore larger than Integer.MAX-VALUE
. To query the size of a RecordStore use
RecordStore.getRecordStoreInfo() and RecordStoreInfo.getSize() ,
which returns a long and can accomodate RecordStore sizes
up to Long.MAX_VALUE .
Returns the amount of additional room (in bytes) available for
this record store to grow. Note that this is not necessarily
the amount of extran application-level data which can be stored,
as implementations may store additional data structures with
each record to support integration with native applications,
synchronization, tag data etc. |
int |
RecordStore.getTag(int recordId)
Returns the tag associated with the
recordId . |
int |
RecordStore.getVersion()
Each time a record store is modified (by
addRecord ,
setRecord , or
deleteRecord methods) its
version is incremented. |
boolean |
RecordStoreInfo.isEncrypted()
Return a boolean indicating if the
RecordStore associated with this
RecordStoreInfo instance is encrypted. |
boolean |
RecordStoreInfo.isWriteable()
Return the boolean writable state for the
RecordStore associated with this
RecordStoreInfo instance. |
byte[] |
RecordEnumeration.nextRecord()
Returns a copy of the next record in this enumeration, where
next is defined by the comparator and/or filter supplied in
the constructor of this enumerator.
|
byte[] |
RecordEnumeration.previousRecord()
Returns a copy of the previous record in this enumeration,
where previous is defined by the comparator and/or filter
supplied in the constructor of this enumerator.
|
void |
RecordStore.setRecord(int recordId,
byte[] newData,
int offset,
int numBytes)
Sets the data in the given record to the provided new data.
|
void |
RecordStore.setRecord(int recordId,
byte[] newData,
int offset,
int numBytes,
int tag)
Sets the data in the given record to the provided new data.
|
Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.