|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.gameengine.icadroids.persistence.GamePersistence
public class GamePersistence
Class for user persistence. With this Class you can save Strings in a File to your internal storage. Both real devices and emulators can use the internal storage. You can use the game persistance for example to save variables or, highscores. You are allowed to use multiple game persistances, each additional persistance saves an additional file on your system if the filename name is different.
Constructor Summary | |
---|---|
GamePersistence(java.lang.String filename)
The constructor allows you to specify the filename the internal storage will use. |
Method Summary | |
---|---|
java.lang.String |
loadData()
Returns the full data (in String format) that is stored in the file. |
void |
saveData(java.lang.String data)
Saves the data to the earlier specified file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GamePersistence(java.lang.String filename)
filename
- The name of the file that will be used for this persistance.Method Detail |
---|
public void saveData(java.lang.String data)
data
- The data that should be saved to the file, the data must be
one entire String.public java.lang.String loadData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |