|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectio.RMSHandler
public class RMSHandler
A class to read and store variables permanently on the mobile using the Record Management System ( RMS ). There are two record stores: One is used to save the properties (settings) of the Application. The other one saves binary data like the mapping-file of items to units (=mapsource[1]) or the graphical representation of the items (=image[0]).
| Field Summary | |
|---|---|
static int |
MAP_IMAGE
|
static int |
MAP_SOURCE
|
| Constructor Summary | |
|---|---|
RMSHandler()
|
|
| Method Summary | |
|---|---|
java.util.Vector |
getRecords()
Enumerates through Record Store and store records in a Vector as String elements (e.g.: "map=gztan.png") |
int |
getResourceSize(int i)
Returns the size of a resources |
boolean |
isEmpty()
Checks if a Record Store (RS) exists on device |
byte[] |
loadResource(int i)
Loads a resources in a byte array from the RMS |
java.lang.String |
loadResourceToString(int i)
Loads a resources in a String from the RMS |
void |
storeRecords(java.util.Vector records)
Stores the elements of a given vector to a record store. |
void |
storeResources(java.util.Vector records)
Stores a Vector of binary resources (byte arrays) to the RMS |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAP_IMAGE
public static final int MAP_SOURCE
| Constructor Detail |
|---|
public RMSHandler()
| Method Detail |
|---|
public void storeResources(java.util.Vector records)
throws javax.microedition.rms.RecordStoreException
records - the vector of byte arrays to store
javax.microedition.rms.RecordStoreException - If a Recordstore can
not be created or opened
public byte[] loadResource(int i)
throws javax.microedition.rms.RecordStoreException
i - the index of the resource to load
javax.microedition.rms.RecordStoreException - thrown if a
Recordstore can not be created or opened
public int getResourceSize(int i)
throws javax.microedition.rms.RecordStoreException
i - the index of the resource
javax.microedition.rms.RecordStoreException - thrown if a
Recordstore can not be created or opened
public java.lang.String loadResourceToString(int i)
throws javax.microedition.rms.RecordStoreException
i - the index of the resource to load
javax.microedition.rms.RecordStoreException - thrown if a
Recordstore can not be created or openedpublic boolean isEmpty()
true if RS is on device, else false
public java.util.Vector getRecords()
throws javax.microedition.rms.RecordStoreException
javax.microedition.rms.RecordStoreException - thrown if access
to record store is not possible
public void storeRecords(java.util.Vector records)
throws javax.microedition.rms.RecordStoreNotOpenException,
javax.microedition.rms.RecordStoreException
records - the records to store
javax.microedition.rms.RecordStoreNotOpenException - thrown if
RS is not open
javax.microedition.rms.RecordStoreException - thrown if RS
is not accessable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||