| java.lang.Object | |||
| ↳ | java.util.Dictionary<K, V> | ||
| ↳ | java.util.Hashtable<K, V> | ||
| ↳ | java.util.Properties | ||
Known Direct Subclasses
|
Known Indirect Subclasses
|
Properties is a Hashtable where the keys and values must be Strings. Each Properties can have a default Properties which specifies the default values which are used if the key is not in this Properties.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| defaults | The default values for this Properties. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Properties object.
| |||||||||||
Constructs a new Properties object using the specified default
properties.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Searches for the property with the specified name.
| |||||||||||
Searches for the property with the specified name.
| |||||||||||
Lists the mappings in this Properties to the specified PrintStream in a
human readable form.
| |||||||||||
Lists the mappings in this Properties to the specified PrintWriter in a
human readable form.
| |||||||||||
Loads properties from the specified InputStream.
| |||||||||||
Returns all of the property names that this Properties contains.
| |||||||||||
This method is deprecated.
Does not throw an IOException, use store(OutputStream, String)
| |||||||||||
Maps the specified key to the specified value.
| |||||||||||
Stores the mappings in this Properties to the specified OutputStream,
putting the specified comment at the beginning.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.Hashtable
| |||||||||||
From class java.util.Dictionary
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.util.Map
| |||||||||||
The default values for this Properties.
Constructs a new Properties object.
Constructs a new Properties object using the specified default properties.
| properties | the default properties |
|---|
Searches for the property with the specified name. If the property is not found, look in the default properties. If the property is not found in the default properties, answer the specified default.
| name | the name of the property to find |
|---|---|
| defaultValue | the default value |
Searches for the property with the specified name. If the property is not found, look in the default properties. If the property is not found in the default properties, answer null.
| name | the name of the property to find |
|---|
Lists the mappings in this Properties to the specified PrintStream in a human readable form.
| out | the PrintStream |
|---|
Lists the mappings in this Properties to the specified PrintWriter in a human readable form.
| writer | the PrintWriter |
|---|
Loads properties from the specified InputStream. The properties are of
the form key=value, one property per line.
| in | the input stream |
|---|
| IOException |
|---|
Returns all of the property names that this Properties contains.
This method is deprecated.Does not throw an IOException, use store(OutputStream, String)
Saves the mappings in this Properties to the specified OutputStream, putting the specified comment at the beginning. The output from this method is suitable for being read by the load() method.
| out | the OutputStream |
|---|---|
| comment | the comment |
| ClassCastException | when the key or value of a mapping is not a String |
|---|
Maps the specified key to the specified value. If the key already exists, the old value is replaced. The key and value cannot be null.
| name | the key |
|---|---|
| value | the value |
Stores the mappings in this Properties to the specified OutputStream, putting the specified comment at the beginning. The output from this method is suitable for being read by the load() method.
| out | the OutputStream |
|---|---|
| comment | the comment |
| IOException | |
|---|---|
| ClassCastException | when the key or value of a mapping is not a String |
| IOException |
|---|
| IOException |
|---|