java.util
Class Properties

java.lang.Object
  extended by java.util.Hashtable
      extended by java.util.Properties

public class Properties
extends Hashtable

Properties class, used to store properties using a key, and retrieving properties with a key. String for both. Integrates well with File for saving to file system.

Author:
BB

Field Summary
protected  Properties defaults
          A property list that contains default values for any keys not found in this property list.
 
Constructor Summary
Properties()
           
Properties(Properties defaults)
           
 
Method Summary
 String getProperty(String key)
           
 String getProperty(String key, String defaultValue)
           
 void list(PrintStream out)
           
 void load(InputStream inStream)
           
 Enumeration propertyNames()
           
 void setProperty(String key, String value)
           
 void store(OutputStream out, String comments)
           
 
Methods inherited from class java.util.Hashtable
get, keys, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaults

protected Properties defaults
A property list that contains default values for any keys not found in this property list.

Constructor Detail

Properties

public Properties()

Properties

public Properties(Properties defaults)
Method Detail

setProperty

public void setProperty(String key,
                        String value)

load

public void load(InputStream inStream)
          throws IOException
Throws:
IOException

store

public void store(OutputStream out,
                  String comments)
           throws IOException
Throws:
IOException

getProperty

public String getProperty(String key)

getProperty

public String getProperty(String key,
                          String defaultValue)

propertyNames

public Enumeration propertyNames()

list

public void list(PrintStream out)