|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.configuration.ConfigurationUtils
Miscellaneous utility methods for 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 |
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 to
public static void dump(Configuration configuration,
PrintWriter out)
configuration - the configurationout - the writer to dump the configuration topublic static String toString(Configuration configuration)
configuration - the configuration
public static void copy(Configuration source,
Configuration target)
source - the source configurationtarget - the target configuration
public static void append(Configuration source,
Configuration target)
source - the source configurationtarget - the target configuration
public static URL getURL(String basePath,
String file)
throws MalformedURLException
basePath - the base path URL (can be null)file - the file name
MalformedURLException - if URLs are invalidpublic static URL locate(String name)
name - the name of the resource
public static URL locate(String base,
String name)
base - the base path of the resourcename - the name of the resource
public static File getFile(String basePath,
String fileName)
basePath - the base pathfileName - the file name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||