|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--store.StorableObject
A StorableObject contains a reference to an object that implements the Storable interface, and also contains the name of the record store and specific record id where this object is kept.
Constructor Summary | |
StorableObject(java.lang.String s,
int id,
Storable data)
Create a new StorableObject. |
Method Summary | |
int |
getRecordID()
Get the record id associated with the user data object. |
java.lang.String |
getStoreName()
Get the record store name associated with the user data object. |
Storable |
getUserData()
Get the user data object. |
void |
readUserDataObject()
Read an array of bytes from the record store, then use the methods provided by a Storable object to update the fields of the object. |
void |
writeUserDataObject()
Write the fields of a Storable object into an array of bytes, then write that array of bytes into the RecordStore. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StorableObject(java.lang.String s, int id, Storable data)
s
- the String name of the RecordStore where the user data
is keptid
- the record id for this user datadata
- the actual user data object kept in the record storeMethod Detail |
public java.lang.String getStoreName()
public int getRecordID()
public Storable getUserData()
public void readUserDataObject() throws javax.microedition.rms.RecordStoreException, java.io.IOException
javax.microedition.rms.RecordStoreException
- if anything bad happens while
getting the record
java.io.IOException
- if anything bad happens while reading
the record data into the objectpublic void writeUserDataObject() throws javax.microedition.rms.RecordStoreException, java.io.IOException
javax.microedition.rms.RecordStoreException
- if anything bad happens while
writing the record
java.io.IOException
- if anything bad happens while writing
the record data into the byte array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |