Public class Properties Extends hashtable <object, Object> The properties class represents a persistent property set. Properties can be saved to or loaded from a stream. In the attribute list, each key and its corresponding value are a string.
A property list can contain another property list as its "Default Value". If the attribute key cannot be found in the original property list, the second property list is searched.
Because properties inherits from hashtable, you can apply the put and putall methods to properties objects. However, these two methods are not recommended because they allow callers to insert items whose keys or values are not strings. Instead, use the setproperty method. If the properties object in "insecure" (that is, including non-
To call the store or save method, the call will fail. Similarly, if the propertynames or list method is called on an insecure properties object (that is, a key containing a non-string Key), the call fails.
The load (Reader)/store (writer, string) method loads and stores attributes in character-based streams in the simple row-oriented format specified below. Except that the input/output streams are encoded in ISO 8859-1 characters, the load (inputstream)/store (outputstream, string) method and load (Reader)/store (writer,
String. You can use Unicode escape to compile characters that cannot be directly expressed in this encoding. Only a single 'U' character is allowed in the escape sequence. The native2ascii tool can be used to convert attribute files and other character encodings. The loadfromxml (inputstream) and storetoxml (outputstream, String, string) Methods load and store attributes in a simple XML format. By default, UTF-8 character encoding is used, but you can specify a specific encoding if needed. This class is thread-safe: Multiple Threads can share a single properties object without external synchronization.