java.util.Properties
The Properties class represents a persistent set of properties. The Properties can be saved to a stream or loaded from a stream. Each key and its corresponding value in the property list is a string.
Some more Methods of Properties class.
getProperty(String, String): This method searches for the property with the specified key in this property list.
hashCode(): This method returns the hash code value for this Map.
isEmpty(): This method tests if this hashtable maps no keys to values.
keys(): This method returns an enumeration of the keys in this hashtable.
keySet(): This method returns a Set view of the keys contained in this map
list(PrintStream): This method prints this property list out to the specified output stream.
list(PrintWriter): This method writes this property list out to the specified output stream.
load(InputStream): This method reads a property list (key and element pairs) from the input byte stream.
load(Reader): This method reads a property list (key and element pairs) from the input character stream in a simple line-oriented format.
loadFromXML(InputStream): This method loads all of the properties represented by the XML document on the specified input stream into this properties table.
merge(Object, Object, BiFunction): If the specified key is not already associated with a value or is associated with null, associate it with the given non-null value.
propertyNames(): This method returns an enumeration of all the keys in this property list, including distinct keys in the default property list if a key of the same name has not already been found from the main properties list.
put(Object, Object): This method maps the specified key to the specified value in this hashtable.
putAll(Map): This method copies all of the mappings from the specified map to this property.
putIfAbsent(Object, Object): If the specified key is not already associated with a value associates it with the given value and returns null, else returns the current value.
Some more Methods of Properties class Part-I
Some more Methods of Properties class Part -III
No comments:
Post a Comment