#include <PropertyFile.h>
Inheritance diagram for PropertyFile:
Public Member Functions | |
PropertyFile (const char *n) | |
The name of the general node. | |
int | close () |
Store the current properties that are in the data arraylist in the filesystem. | |
int | setPropertyValue (const char *prop, const char *value) |
The setPropertyValue of the PropertyFile calls the super implementation and then write in the journal list with a simple append. | |
int | removeProperty (const char *prop) |
To remove the property, also the journal has to be updated. | |
int | removeAllProperties () |
It remove all the properties in memory and in the storage. | |
bool | separateKeyValue (StringBuffer &s, StringBuffer &key, StringBuffer &value) |
It sepatares from the line read from the property file the key and value. |
It provides methods to read and write in the filesystem the arraylist of KeyValuePair
int PropertyFile::close | ( | ) | [virtual] |
Store the current properties that are in the data arraylist in the filesystem.
It deletes the journal too
Implements MemoryKeyValueStore.
int PropertyFile::setPropertyValue | ( | const char * | prop, | |
const char * | value | |||
) | [virtual] |
The setPropertyValue of the PropertyFile calls the super implementation and then write in the journal list with a simple append.
prop | - the name of the prop | |
value | - the value |
Reimplemented from MemoryKeyValueStore.
int PropertyFile::removeProperty | ( | const char * | prop | ) | [virtual] |
To remove the property, also the journal has to be updated.
In the case, it is always updated with an append so at the next read it can be fixed
Reimplemented from MemoryKeyValueStore.
bool PropertyFile::separateKeyValue | ( | StringBuffer & | s, | |
StringBuffer & | key, | |||
StringBuffer & | value | |||
) |
It sepatares from the line read from the property file the key and value.
It takes care