Properties class represents a persistent set of properties.
More...
#include <java_util_Properties.h>
Inheritance diagram for java::util::Properties:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::util::Properties > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::util::Properties > > | array2D |
Public Member Functions | |
| virtual ::java::lang::String | getProperty (const ::java::lang::String &key, const ::java::lang::String &defaultValue,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Searches for the property with the specified key in this property list. | |
| virtual ::java::lang::String | getProperty (const ::java::lang::String &key,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Searches for the property with the specified key in this property list. | |
| virtual void | list (const ::java::io::PrintWriter &out,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Prints this property list out to the specified output stream. | |
| virtual void | list (const ::java::io::PrintStream &out,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Prints this property list out to the specified output stream. | |
| virtual void | load (const ::java::io::InputStream &inStream,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Reads a property list (key and element pairs) from the input stream. | |
| Properties (const ::java::util::Properties &defaults,::xmog_dummy _use_java_ctor,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
| Creates an empty property list with the specified defaults. | |
| Properties (::xmog_dummy _use_java_ctor,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
| Creates an empty property list with no default values. | |
| virtual ::java::util::Enumeration | propertyNames (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| 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. | |
| virtual void | save (const ::java::io::OutputStream &out, const ::java::lang::String &header,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Calls the store(OutputStream out, String header) method and suppresses IOExceptions that were thrown. | |
| virtual ::java::lang::Object | setProperty (const ::java::lang::String &key, const ::java::lang::String &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Calls the Hashtable method put. | |
| virtual void | store (const ::java::io::OutputStream &out, const ::java::lang::String &header,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
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 method. | |
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.
A property list can contain another property list as its "defaults"; this second property list is searched if the property key is not found in the original property list.
Because Properties inherits from Hashtable, the put and putAll methods can be applied to a Properties object. Their use is strongly discouraged as they allow the caller to insert entries whose keys or values are not Strings. The setProperty method should be used instead. If the store or save method is called on a "compromised" Properties object that contains a non-String key or value, the call will fail.
When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.
Michael McCloskey
|
||||||||||||||||
|
Creates an empty property list with no default values.
|
|
||||||||||||||||||||
|
Creates an empty property list with the specified defaults.
|
|
||||||||||||||||||||
|
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.
|
|
||||||||||||||||
|
Searches for the property with the specified key in this property list.
If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns
|
|
||||||||||||||||
|
Prints this property list out to the specified output stream. This method is useful for debugging.
|
|
||||||||||||||||
|
Prints this property list out to the specified output stream. This method is useful for debugging.
|
|
||||||||||||||||
|
Reads a property list (key and element pairs) from the input stream. The stream is assumed to be using the ISO 8859-1 character encoding; that is each byte is one Latin1 character. Characters not in Latin1, and certain special characters, can be represented in keys and elements using escape sequences similar to those used for character and string literals (see 3.3 and 3.10.6 of the Java Language Specification). The differences from the character escape sequences used for characters and strings are:
|
|
||||||||||||
|
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.
|
|
||||||||||||||||||||
|
Calls the
|
|
||||||||||||||||||||
|
Calls the
Provided for parallelism with the
|
|
||||||||||||||||||||
|
Writes this property list (key and element pairs) in this The stream is written using the ISO 8859-1 character encoding.
Properties from the defaults table of this
If the header argument is not null, then an ASCII
Next, a comment line is always written, consisting of an ASCII
Then every entry in this
|
1.4.1