oracle.adfnmc.java.util
Class Properties
java.lang.Object
java.util.Hashtable
oracle.adfnmc.java.util.Properties
public class Properties
- extends java.util.Hashtable
Method Summary |
java.lang.String |
getProperty(java.lang.String name)
|
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
|
void |
load(java.io.InputStream in)
|
java.util.Enumeration |
propertyNames()
|
java.lang.Object |
setProperty(java.lang.String name,
java.lang.String value)
Maps the specified key to the specified value. |
void |
store(java.io.OutputStream out,
java.lang.String comment)
Stores the mappings in this Properties to the specified OutputStream, putting the specified comment at the
beginning. |
Methods inherited from class java.util.Hashtable |
clear, contains, containsKey, elements, get, isEmpty, keys, put, rehash, remove, size, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Properties
public Properties()
getProperty
public java.lang.String getProperty(java.lang.String name)
propertyNames
public java.util.Enumeration propertyNames()
setProperty
public java.lang.Object setProperty(java.lang.String name,
java.lang.String value)
- 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.
- Parameters:
name
- the keyvalue
- the value
- Returns:
- the old value mapped to the key, or null
getProperty
public java.lang.String getProperty(java.lang.String name,
java.lang.String defaultValue)
load
public void load(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
store
public void store(java.io.OutputStream out,
java.lang.String comment)
throws java.io.IOException
- 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.
- Parameters:
out
- the OutputStreamcomment
- the comment
- Throws:
java.io.IOException
java.lang.ClassCastException
- when the key or value of a mapping is not a String
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.