Class sun.server.misc.ExProperties
All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.misc.ExProperties
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----java.util.Properties
|
+----sun.server.misc.ExProperties
- public class ExProperties
- extends Properties
Enhanced support for properties. This methods in this class should
eventually be put back into java.util.Properties.
-
ExProperties()
- Creates an empty property list.
-
ExProperties(Properties)
- Creates an empty property list with specified defaults.
-
getProperty(String, boolean)
- Returns the boolean value of a property.
-
getProperty(String, int)
- Returns the integer value of a property.
-
getProperty(String, long)
- Returns the long value of a property.
-
load(File)
- Loads properties from the specified file.
-
load(InputStream)
-
-
load(String)
- Loads properties from the specified file.
-
save(File, String)
- Saves properties to the specified file.
-
save(OutputStream, String)
- overrides the save() method in Properties to
load server specific property files.
-
save(String, String)
- Saves properties to the specified file.
-
setProperty(String, boolean)
- Sets the boolean value of a property.
-
setProperty(String, int)
- Sets the integer value of a property.
-
setProperty(String, long)
- Sets the long value of a property.
-
setProperty(String, String)
- Sets the value of a property.
ExProperties
public ExProperties()
- Creates an empty property list.
ExProperties
public ExProperties(Properties defaults)
- Creates an empty property list with specified defaults.
- Parameters:
- defaults - the defaults
load
public void load(String name) throws IOException
- Loads properties from the specified file.
- Parameters:
- name - the file name
- Throws: FileNotFoundException
- if the file is not found
- Throws: IOException
- if an I/O error has occurred
load
public void load(InputStream in) throws IOException
- Overrides:
- load in class Properties
load
public void load(File file) throws IOException
- Loads properties from the specified file.
- Parameters:
- file - the file object
- Throws: FileNotFoundException
- if the file is not found
- Throws: IOException
- if an I/O error has occurred
save
public void save(String name,
String header) throws IOException
- Saves properties to the specified file.
- Parameters:
- name - the file name
- header - the header comment
- Throws: IOException
- if an I/O error has occurred
save
public void save(OutputStream out,
String header)
- overrides the save() method in Properties to
load server specific property files.
- Overrides:
- save in class Properties
save
public void save(File file,
String header) throws IOException
- Saves properties to the specified file.
- Parameters:
- file - the file object
- header - the header comment
- Throws: IOException
- if an I/O error has occurred
getProperty
public int getProperty(String key,
int def) throws NumberFormatException
- Returns the integer value of a property.
- Parameters:
- key - the property key
- def - the default value to return if this property is not set
- Throws: NumberFormatException
- if the property is set but cannot be
parsed as an integer
getProperty
public long getProperty(String key,
long def) throws NumberFormatException
- Returns the long value of a property.
- Parameters:
- key - the property key
- def - the default value to return if this property is not set
- Throws: NumberFormatException
- if the property is set but cannot be
parsed as a long
getProperty
public boolean getProperty(String key,
boolean def)
- Returns the boolean value of a property.
- Parameters:
- key - the property key
- def - the default value to return if this property is not set
setProperty
public void setProperty(String key,
String s)
- Sets the value of a property.
- Parameters:
- key - the property key
- s - the property value
setProperty
public void setProperty(String key,
int i)
- Sets the integer value of a property.
- Parameters:
- key - the property key
- i - the integer value
setProperty
public void setProperty(String key,
long l)
- Sets the long value of a property.
- Parameters:
- key - the property key
- l - the long value
setProperty
public void setProperty(String key,
boolean b)
- Sets the boolean value of a property.
- Parameters:
- key - the property key
- b - the boolean value
All Packages Class Hierarchy This Package Previous Next Index