org.afcs.warts.util
Class PropertyFileLoader

java.lang.Object
  extended byorg.afcs.warts.util.PropertyFileLoader

public final class PropertyFileLoader
extends java.lang.Object

The PropertyFileLoader utility class contains a method to assist both command line and GUI applications load a set of properties from a file.

LICENSE: This code is released to the public domain and may be used for any purpose whatsoever without permission or acknowledgment.

Version:
Last Modified 18 Spetember 2003
Author:
Warren Hedley ( whedley at sdsc dot edu )

Method Summary
static java.util.Properties loadPropertiesFromFile(java.lang.String filename)
          Loads and returns a set of properties loaded from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadPropertiesFromFile

public static java.util.Properties loadPropertiesFromFile(java.lang.String filename)
Loads and returns a set of properties loaded from a file. If the specified file doesn't exist or if an IO error occurs, and error message is printed and System.exit(1) is called. This is primitive but forces the user to provide valid input files.

Parameters:
filename - The name of the file to load.
Returns:
The set of properties defined in the file.
Throws:
java.lang.NullPointerException - If filename is null.