|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.configuration.ConfigurationUtils
Miscellaneous utility methods for configurations.
Utility methods to convert configurations.
Method Summary | |
static void |
append(Configuration source,
Configuration target)
Append all properties from the source configuration to the target configuration. |
static void |
copy(Configuration source,
Configuration target)
Copy all properties from the source configuration to the target configuration. |
static void |
dump(Configuration configuration,
PrintStream out)
Dump the configuration key/value mappings to some ouput stream. |
static void |
dump(Configuration configuration,
PrintWriter out)
Dump the configuration key/value mappings to some writer. |
static File |
fileFromURL(URL url)
Tries to convert the specified URL to a file object. |
static File |
getFile(String basePath,
String fileName)
Tries to convert the specified base path and file name into a file object. |
static URL |
getURL(String basePath,
String file)
Constructs a URL from a base path and a file name. |
static URL |
locate(String name)
Return the location of the specified resource by searching the user home directory, the current classpath and the system classpath. |
static URL |
locate(String base,
String name)
Return the location of the specified resource by searching the user home directory, the current classpath and the system classpath. |
static String |
toString(Configuration configuration)
Get a string representation of the key/value mappings of a configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void dump(Configuration configuration, PrintStream out)
configuration
- the configurationout
- the output stream to dump the configuration topublic static void dump(Configuration configuration, PrintWriter out)
configuration
- the configurationout
- the writer to dump the configuration topublic static String toString(Configuration configuration)
configuration
- the configurationpublic static void copy(Configuration source, Configuration target)
clone()
methods
should be used.source
- the source configurationtarget
- the target configurationpublic static void append(Configuration source, Configuration target)
source
- the source configurationtarget
- the target configurationpublic static URL getURL(String basePath, String file) throws MalformedURLException
basePath
- the base path URL (can be null)file
- the file nameMalformedURLException
- if URLs are invalidpublic static URL locate(String name)
name
- the name of the resourcepublic static URL locate(String base, String name)
base
- the base path of the resourcename
- the name of the resourcepublic static File getFile(String basePath, String fileName)
basePath
- the base pathfileName
- the file namepublic static File fileFromURL(URL url)
url
- the URL
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |