|
|||||||||||
| 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 | |
(package private) static File |
constructFile(String basePath,
String fileName)
Helper method for constructing a file object from a base path and a file name. |
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. |
(package private) static String |
getBasePath(URL url)
Return the path without the file name, for example http://xyz.net/foo/bar.xml results in http://xyz.net/foo/ |
(package private) static String |
getFileName(URL url)
Extract the file name from the specified URL. |
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 URL getURL(String basePath,
String file)
throws MalformedURLException
basePath - the base path URL (can be null)file - the file name
MalformedURLException - if URLs are invalid
static File constructFile(String basePath,
String fileName)
getURL() does not seem to be a valid URL.
basePath - the base pathfileName - the file name
public 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
static String getBasePath(URL url)
url -
static String getFileName(URL url)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||