Jwma

dtw.webmail.util
Class PropertiesLoader

java.lang.Object
  |
  +--dtw.webmail.util.PropertiesLoader

public class PropertiesLoader
extends java.lang.Object

Utility class providing two simple yet powerful methods for loading properties.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Constructor Summary
PropertiesLoader()
           
 
Method Summary
static java.util.Properties loadProperties(java.lang.String url)
          Returns a Properties instance loaded from the URL given as String.
static java.util.Properties loadProperties(java.net.URL url)
          Returns a Properties instance loaded from the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesLoader

public PropertiesLoader()
Method Detail

loadProperties

public static java.util.Properties loadProperties(java.lang.String url)
                                           throws java.net.MalformedURLException,
                                                  java.io.IOException
Returns a Properties instance loaded from the URL given as String.

Parameters:
url - that refers to the properties file as String.
Returns:
loaded Properties instance.
Throws:
java.net.MalformedURLException - if the String does not represent a valid URL.
java.io.IOException - if the method fails to access the URL.

loadProperties

public static java.util.Properties loadProperties(java.net.URL url)
                                           throws java.io.IOException
Returns a Properties instance loaded from the given URL.

Parameters:
url - that refers to the properties file as java.net.URL.
Returns:
loaded Properties instance.
Throws:
java.io.IOException - if the method fails to access the URL.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)