|
||||||||||
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. |
java.lang.Object |
load(java.lang.String name)
Loads the object whose name is given, from the currently opened storage. |
void |
open(java.lang.String storage)
Opens the storage whose name is given. |
void |
store(java.lang.String name,
java.lang.Object value)
Stores the given object under the given name in the currently opened storage. |
Method Detail |
public void open(java.lang.String storage) throws java.lang.Exception
storage
- name of the storage to be opened
java.lang.Exception
- if the storage cannot be opened.public java.lang.Object load(java.lang.String name) throws java.lang.Exception
name
- the name of the object to be loaded.
java.lang.Exception
- if the given object cannot be loaded.public void store(java.lang.String name, java.lang.Object value) throws java.lang.Exception
name
- the name of the object to be stored.value
- the value of the object to be stored.
java.lang.Exception
- if the object cannot be stored.public void close() throws java.lang.Exception
java.lang.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 |