Class marimba.util.Props
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class marimba.util.Props

java.lang.Object
   |
   +----java.util.Dictionary
           |
           +----java.util.Hashtable
                   |
                   +----java.util.Properties
                           |
                           +----marimba.util.Props

public class Props
extends Properties
implements Cloneable
A wrapper class for Properties. Add adds a header, file name, is case insensitive, and keeps track of changes.
Version:
1.39, 01/04/97
Author:
Arthur van Hoff

Variable Index

 o changed

Constructor Index

 o Props(Properties, String, String)
Construct from parent.
 o Props(String, File, boolean)
Constructor.
 o Props(String, String)
Constructor.
 o Props(String, String, boolean)
Constructor.

Method Index

 o addPropsFrom(Props)
 o clean()
 o clear()
 o clone()
 o get(Object)
Get a property, ignore case.
 o getBoolean(String, boolean)
 o getFile()
 o getInteger(String, int)
 o getLong(String, long)
 o getProperty(String)
Get a property, ignore case.
 o getProperty(String, String)
Get a property, ignore case.
 o load()
Load from the file.
 o put(Object, Object)
Store a property.
 o remove(Object)
Remove a key.
 o save()
Save to the file.
 o save(FastOutputStream, String)
Save properties to an OutputStream.
 o setProp(Object, Object)
Store a property only if the value is not null or an empty string.
 o setProperty(String, String)
Set a property, ignore case.
 o toString()
Debugging.
 o touch()
Mark the properties as changed.

Variables

 o changed
  public boolean changed

Constructors

 o Props
  public Props(String hdr,
               String file)
Constructor.
 o Props
  public Props(String hdr,
               File file,
               boolean sensitive)
Constructor.
 o Props
  public Props(String hdr,
               String file,
               boolean sensitive)
Constructor.
 o Props
  public Props(Properties parent,
               String hdr,
               String file)
Construct from parent.

Methods

 o clone
  public Object clone()
Overrides:
clone in class Hashtable
 o save
  public synchronized boolean save()
Save to the file. Return false if the save fails for any reason.
 o save
  public synchronized void save(FastOutputStream prnt,
                                String header)
Save properties to an OutputStream. Use the header as a comment at the top of the file. This now uses a FastOutputStream so that it is more efficient and so that it saves it in the appropriate format.
 o load
  public synchronized boolean load()
Load from the file. Returns whether the load succeeded.
 o touch
  public synchronized void touch()
Mark the properties as changed.
 o clear
  public synchronized void clear()
Overrides:
clear in class Hashtable
 o clean
  public synchronized void clean()
 o remove
  public synchronized Object remove(Object key)
Remove a key.
Overrides:
remove in class Hashtable
 o get
  public Object get(Object key)
Get a property, ignore case.
Overrides:
get in class Hashtable
 o getProperty
  public String getProperty(String key)
Get a property, ignore case.
Overrides:
getProperty in class Properties
 o getProperty
  public String getProperty(String key,
                            String defaultValue)
Get a property, ignore case.
Overrides:
getProperty in class Properties
 o put
  public synchronized Object put(Object key,
                                 Object val)
Store a property. If the key is a string, then convert it to lower case.
Overrides:
put in class Hashtable
 o addPropsFrom
  public synchronized void addPropsFrom(Props src)
 o setProp
  public synchronized Object setProp(Object key,
                                     Object val)
Store a property only if the value is not null or an empty string.
 o setProperty
  public synchronized void setProperty(String key,
                                       String val)
Set a property, ignore case.
 o getFile
  public String getFile()
 o getLong
  public long getLong(String name,
                      long def)
 o getInteger
  public int getInteger(String name,
                        int def)
 o getBoolean
  public boolean getBoolean(String name,
                            boolean def)
 o toString
  public String toString()
Debugging.
Overrides:
toString in class Hashtable

All Packages  Class Hierarchy  This Package  Previous  Next  Index