tot.xml
类 ConfigurationUtils

java.lang.Object
  继承者 tot.xml.ConfigurationUtils

public class ConfigurationUtils
extends java.lang.Object

Miscellaneous utility methods for configurations.


字段摘要
protected static java.lang.String fileSeparator
          File separator.
 
方法摘要
static void dump(Configuration configuration, java.io.PrintStream out)
          Dump the configuration key/value mappings to some ouput stream.
static void dump(Configuration configuration, java.io.PrintWriter out)
          Dump the configuration key/value mappings to some writer.
static java.net.URL getURL(java.lang.String basePath, java.lang.String file)
          Constructs a URL from a base path and a file name.
static java.lang.String toString(Configuration configuration)
          Get a string representation of the key/value mappings of a configuration.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

fileSeparator

protected static java.lang.String fileSeparator
File separator.

方法详细信息

dump

public static void dump(Configuration configuration,
                        java.io.PrintStream out)
Dump the configuration key/value mappings to some ouput stream.

参数:
configuration - the configuration
out - the output stream to dump the configuration to

dump

public static void dump(Configuration configuration,
                        java.io.PrintWriter out)
Dump the configuration key/value mappings to some writer.

参数:
configuration - the configuration
out - the writer to dump the configuration to

toString

public static java.lang.String toString(Configuration configuration)
Get a string representation of the key/value mappings of a configuration.

参数:
configuration - the configuration
返回:
a string representation of the configuration

getURL

public static java.net.URL getURL(java.lang.String basePath,
                                  java.lang.String file)
                           throws java.net.MalformedURLException
Constructs a URL from a base path and a file name. The file name can be absolute, relative or a full URL. If necessary the base path URL is applied.

参数:
basePath - the base path URL (can be null)
file - the file name
返回:
the resulting URL
抛出:
java.net.MalformedURLException - if URLs are invalid