public class PropertyUtils extends Object
Constructor and Description |
---|
PropertyUtils() |
Modifier and Type | Method and Description |
---|---|
Properties |
getProperties(String propertyResourceLocation)
Retrieves the properties from the specified properties file
|
Properties |
getPropertiesFromStream(InputStream is)
Loads Properties from an InputStream
|
boolean |
removeProperty(String propertyResourceLocation,
String key)
Removes the specified property from the specified property file
|
void |
updateProperty(String propertyResourceLocation,
String key,
String value)
Updates the specified properties file with the specified key/value property
|
public Properties getProperties(String propertyResourceLocation)
propertyResourceLocation
- location of the properties filepublic Properties getPropertiesFromStream(InputStream is)
is
- InputStream containing properties to loadpublic boolean removeProperty(String propertyResourceLocation, String key)
propertyResourceLocation
- location of the properties filekey
- the key of the property to be removedtrue iff the specified property has been successfully removed from the properties file; false
otherwise
public void updateProperty(String propertyResourceLocation, String key, String value)
propertyResourceLocation
- location of the properties filekey
- the key for the property to be added/updatedvalue
- the value of the property to be added/updatedCopyright © 2013 Atlassian. All Rights Reserved.