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.
remove(Object): This method removes the key (and its corresponding value) from this hashtable.
remove(Object, Object): This method removes the entry for the specified key only if it is currently mapped to the specified value.
replace(Object, Object): This method replaces the entry for the specified key only if it is currently mapped to some value.
replace(Object, Object, Object): This method replaces the entry for the specified key only if currently mapped to the specified value.
replaceAll(BiFunction): This method replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception.
setProperty(String, String): This method calls the Hashtable method put.
size(): This method returns the number of keys in this hashtable.
store(OutputStream, String): This method writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable for loading into a Properties table using the load(InputStream) method.
store(Writer, String): This method writes this property list (key and element pairs) in this Properties table to the output character stream in a format suitable for using the load (Reader) method.
storeToXML(OutputStream, String): This method emits an XML document representing all of the properties contained in this table.
storeToXML(OutputStream, String, Charset): This method emits an XML document representing all of the properties contained in this table, using the specified encoding.
stringPropertyNames(): This method returns an unmodifiable set of keys from this property list where the key and its corresponding value are strings.
toString(): This method returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters " , " (comma and space).
values(): This method returns a Collection view of the values contained in this map.
Some more Methods of Properties class Part-I
Some more Methods of Properties class Part -II
No comments:
Post a Comment