|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A generic storage manager. A storage can be a single file, and set of files organized in a several directories, a data base, etc. A storage must be opened before one can read or write values in it. It must be closed after use. Each storage contains a set of (name, value) pairs.
| Method Summary | |
void |
close()
Closes the currently opened storage. |
Object |
load(String name)
Loads the object whose name is given, from the currently opened storage. |
void |
open(String storage,
boolean create)
Opens the storage whose name is given. |
void |
store(String name,
Object value)
Stores the given object under the given name in the currently opened storage. |
| Method Detail |
public void open(String storage,
boolean create)
throws Exception
storage - name of the storage to be openedcreate - true to create a new storage, or to override an
existing one, or false to open an existing storage.
Exception - if the storage cannot be opened.
public Object load(String name)
throws Exception
name - the name of the object to be loaded.
Exception - if the given object cannot be loaded.
public void store(String name,
Object value)
throws Exception
name - the name of the object to be stored.value - the value of the object to be stored.
Exception - if the object cannot be stored.
public void close()
throws Exception
Exception - if the currently opened storage cannot be closed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||