|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.app.util.ConfigurationUtil
public class ConfigurationUtil
| Field Summary | |
|---|---|
static String |
DEFAULT_RESOURCES_LOCATION
|
| Constructor Summary | |
|---|---|
ConfigurationUtil()
|
|
| Method Summary | |
|---|---|
static String |
loadConfigurationContents(File file)
Load configuration settings from the specified file. |
static String |
loadConfigurationContents(String resourceName)
Load configuration settings from a resource on the classpath. |
static Properties |
loadConfigurationProperties(File file,
Properties defaults)
Load configuration properties from the specified file. |
static Properties |
loadConfigurationProperties(String resourceName,
Properties defaults)
Load configuration properties from a resource on the classpath. |
static void |
saveConfigurationContents(String contents,
File file)
Save configuration settings to a file. |
static void |
saveConfigurationProperties(Properties props,
File file,
boolean includeDefaults)
Save configuration properties to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_RESOURCES_LOCATION
| Constructor Detail |
|---|
public ConfigurationUtil()
| Method Detail |
|---|
public static String loadConfigurationContents(File file)
throws IOException
file - the file to load from
IOException - if the contents of the file could not be read due to an I/O
problem
public static String loadConfigurationContents(String resourceName)
throws IOException
resourceName - the name of the resource
IOException - if the resource could not be read due to an I/O problem#getConfigurationResourceAsStream(String)
public static Properties loadConfigurationProperties(File file,
Properties defaults)
throws IOException
file - the file to load from
IOException - if the contents of the file could not be read due to an I/O
problem
public static Properties loadConfigurationProperties(String resourceName,
Properties defaults)
throws IOException
resourceName - the name of the resource
IOException - if the resource could not be read due to an I/O problem#getConfigurationResourceAsStream(String)
public static void saveConfigurationContents(String contents,
File file)
throws IOException
contents - the configuration settingsfile - the file to write to
IOException - if the settings could not be saved because of an I/O problem
public static void saveConfigurationProperties(Properties props,
File file,
boolean includeDefaults)
throws IOException
props - the configuration propertiesfile - the file to write to
IOException - if the settings could not be saved because of an I/O problem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||