public class HdxProperties extends Object
We initialise properties from the property file named by the
system property Hdx.properties
, or if
that does not exist, from the file
Hdx.properties
located in the current directory
(System property user.dir
).
The interface here is patterned after the property methods on
the System
object.
Modifier and Type | Method and Description |
---|---|
static Properties |
getProperties()
Determines the current Hdx properties.
|
static String |
getProperty(String key)
Gets the Hdx property indicated by the specified key.
|
static String |
getProperty(String key,
String def)
Gets the Hdx property indicated by the specified key.
|
static String |
setProperty(String key,
String value)
Sets the Hdx property indicated by the specified key.
|
public static Properties getProperties()
The current set of system
properties for use by the getProperty(java.lang.String)
method is
returned as a Properties
object.
If there is no current set of Hdx properties (that is, this method is being invoked for the first time), a set of Hdx properties is first created and initialized. In all cases, the Hdx properties are defaulted by the System properties.
Properties
object containing all the Hdx
propertiespublic static String getProperty(String key)
If there is no current set of Hdx properties, a set of properties is first created and initialized in the same manner as described above.
Unlike the corresponding method on System
, this
method throws no exceptions, and simply returns
null
on any error.
key
- the name of the Hdx propertypublic static String getProperty(String key, String def)
If there is no current set of Hdx properties, a set of properties is first created and initialized in the same manner as described above.
Unlike the corresponding method on System
, this
method throws no exceptions, and simply returns
null
on any error.
key
- the name of the Hdx propertydef
- a default valuepublic static String setProperty(String key, String value) throws HdxException
Unlike the corresponding method on System
, this
method throws only HdxException
on any error.
key
- the name of the Hdx propertyvalue
- the value of the Hdx propertyHdxException
- on any errorCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.