|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthenplus.io.ConfigurationContainer
public final class ConfigurationContainer
Helper class to write the configuration. Focus is to avoid half-written configuration files if IO-Errors occur (full harddisk ..) and to merge properties.
Nested Class Summary | |
---|---|
static interface |
ConfigurationContainer.ReadAction
|
static interface |
ConfigurationContainer.WriteAction
|
Constructor Summary | |
---|---|
ConfigurationContainer(File file)
|
Method Summary | |
---|---|
void |
read(ConfigurationContainer.ReadAction action)
Execute the read action with the InputStream from the corresponding configuration file. |
Map |
readProperties()
|
Map |
readProperties(Map prefill)
convenience-method to read properties. |
void |
storeProperties(Map props,
boolean allowMerge,
String comment)
convenience-method to write properties. |
void |
write(ConfigurationContainer.WriteAction action)
Write configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationContainer(File file)
Method Detail |
---|
public void read(ConfigurationContainer.ReadAction action)
public void write(ConfigurationContainer.WriteAction action)
public Map readProperties()
public Map readProperties(Map prefill)
public void storeProperties(Map props, boolean allowMerge, String comment)
allowMerge
- allow merging of properties that have
been added by another instance of henplus.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |