jwo.utils
Class SecureProperties

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended byjwo.utils.SecureProperties
All Implemented Interfaces:
Cloneable, Map, Serializable

public class SecureProperties
extends Properties

Stores an encrypted version of a properties hashtable.

Version:
2.2, 4th February, 2002
Author:
Jo Wood.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
SecureProperties()
          Creates an empty and unencrypted property list with no default values.
SecureProperties(byte key)
          Creates an empty property list with no default values.
SecureProperties(Properties defaults)
          Creates an empty and unencrypted property list with the specified defaults.
SecureProperties(Properties defaults, byte key)
          Creates an empty property list with the specified defaults.
 
Method Summary
 void load(InputStream inStream)
          Reads a property list (key and element pairs) from the input stream.
 void store(OutputStream out, String header)
          Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, propertyNames, save, setProperty
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecureProperties

public SecureProperties()
Creates an empty and unencrypted property list with no default values.


SecureProperties

public SecureProperties(byte key)
Creates an empty property list with no default values.

Parameters:
key - Key for encryption.

SecureProperties

public SecureProperties(Properties defaults)
Creates an empty and unencrypted property list with the specified defaults.

Parameters:
defaults - Default properties.

SecureProperties

public SecureProperties(Properties defaults,
                        byte key)
Creates an empty property list with the specified defaults.

Parameters:
defaults - Default properties.
Method Detail

store

public void store(OutputStream out,
                  String header)
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load method.

Parameters:
out - an output stream.
header - a description of the property list.

load

public void load(InputStream inStream)
Reads a property list (key and element pairs) from the input stream. The stream is assumed to be using the ISO 8859-1 character encoding.

Parameters:
inStream - Input stream containing property list.


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005