|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.storage.StringKeyValueFileStore
public class StringKeyValueFileStore
Field Summary | |
---|---|
protected java.lang.String |
fileName
|
protected java.util.Hashtable |
store
|
Constructor Summary | |
---|---|
StringKeyValueFileStore(java.lang.String fileName)
|
Method Summary | |
---|---|
boolean |
contains(java.lang.String key)
Returns true iff key is contained in this store. |
java.lang.String |
get(java.lang.String key)
Returns the value associated to the given key or null if not present. |
java.util.Enumeration |
keys()
Returns an enumeration with all the keys in the store. |
void |
load()
Load this store into memory. |
java.lang.String |
put(java.lang.String key,
java.lang.String value)
Add a new item into the store. |
java.lang.String |
remove(java.lang.String key)
Removes an entry from the store |
void |
reset()
Resets this data store. |
void |
save()
Persist this store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable store
protected java.lang.String fileName
Constructor Detail |
---|
public StringKeyValueFileStore(java.lang.String fileName)
Method Detail |
---|
public java.lang.String put(java.lang.String key, java.lang.String value)
StringKeyValueStore
put
in interface StringKeyValueStore
key
- the unique key for this item (cannot be null)value
- the value to be stored
public java.lang.String get(java.lang.String key)
StringKeyValueStore
get
in interface StringKeyValueStore
key
- is the key (cannot be null)
public java.util.Enumeration keys()
StringKeyValueStore
keys
in interface StringKeyValueStore
public boolean contains(java.lang.String key)
StringKeyValueStore
contains
in interface StringKeyValueStore
public java.lang.String remove(java.lang.String key)
StringKeyValueStore
remove
in interface StringKeyValueStore
key
- the item key
public void save() throws java.io.IOException
StringKeyValueStore
save
in interface StringKeyValueStore
java.io.IOException
- if the operation cannot be performedpublic void load() throws java.io.IOException
StringKeyValueStore
load
in interface StringKeyValueStore
java.io.IOException
- if the operation cannot be performedpublic void reset() throws java.io.IOException
StringKeyValueStore
reset
in interface StringKeyValueStore
java.io.IOException
- if the operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |