TelnetD at SF

net.wimpi.telnetd.util
Class PropertiesLoader

java.lang.Object
  extended bynet.wimpi.telnetd.util.PropertiesLoader

public final class PropertiesLoader
extends java.lang.Object

Utility class implementing two simple yet powerful methods for loading properties (i.e. settings/configurations).

Version:
2.0 (13/03/2005)
Author:
Dieter Wimberger

Method Summary
static java.util.Properties loadProperties(java.lang.String url)
          Loads a properties file from an URL given as String.
static java.util.Properties loadProperties(java.net.URL url)
          Loads a properties file from a given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadProperties

public static java.util.Properties loadProperties(java.lang.String url)
                                           throws java.net.MalformedURLException,
                                                  java.io.IOException
Loads a properties file from an URL given as String.

Parameters:
url - the string representing the URL.
Returns:
the properties instance loaded from the given URL.
Throws:
java.net.MalformedURLException - if the URL is invalid.
java.io.IOException - if the properties cannot be loaded from the given URL.

loadProperties

public static java.util.Properties loadProperties(java.net.URL url)
                                           throws java.io.IOException
Loads a properties file from a given URL.

Parameters:
url - an URL instance.
Returns:
the properties instance loaded from the given URL.
Throws:
java.io.IOException - if the properties cannot be loaded from the given URL.

TelnetD at SF

Copyright © 2000-2005 Dieter Wimberger.