public class XMLProperties extends Object
<X>
<Y>
<Z>someValue</Z>
</Y>
</X>
The XML file is passed in to the constructor and must be readable and
writtable. Setting property values will automatically persist those value to
disk or outputStream.| 构造器和说明 |
|---|
XMLProperties(InputStream inputStream)
Creates a new XMLProperties object.
|
XMLProperties(String fileName)
Creates a new XMLProperties object.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deleteProperty(String name)
Deletes the specified property.
|
String[] |
getChildrenProperties(String parent)
Return all children property names of a parent property as a String
array, or an empty array if the if there are no children.
|
String[] |
getChildrenPropertiesValues(String parent) |
String |
getProperty(String name)
Returns the value of the specified property.
|
void |
setProperty(String name,
String value)
Sets the value of the specified property.
|
public XMLProperties(String fileName)
public XMLProperties(InputStream inputStream)
public String getProperty(String name)
name - the name of the property to get.public String[] getChildrenProperties(String parent)
parent - the name of the parent property.public void setProperty(String name, String value)
name - the name of the property to set.value - the new value for the property.public void deleteProperty(String name)
name - the property to delete.Copyright © 2018. All rights reserved.