| org.apache.commons.configuration.HierarchicalConfiguration org.apache.commons.configuration.AbstractHierarchicalFileConfiguration org.apache.commons.configuration.plist.PropertyListConfiguration
PropertyListConfiguration | public class PropertyListConfiguration extends AbstractHierarchicalFileConfiguration (Code) | | NeXT / OpenStep style configuration.
(http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Concepts/OldStylePListsConcept.html)
Example:
{
foo = "bar";
array = ( value1, value2, value3 );
data = <4f3e0145ab>;
nested =
{
key1 = value1;
key2 = value;
nested =
{
foo = bar
}
}
}
since: 1.2 author: Emmanuel Bourg version: $Revision: 492216 $, $Date: 2007-01-03 17:51:24 +0100 (Mi, 03 Jan 2007) $ |
Method Summary | |
public void | load(Reader in) | String | quoteString(String s) Quote the specified string if necessary, that's if the string contains:
- a space character (' ', '\t', '\r', '\n')
- a quote '"'
- special characters in plist files ('(', ')', '{', '}', '=', ';', ',')
Quotes within the string are escaped. | public void | save(Writer out) |
PropertyListConfiguration | public PropertyListConfiguration()(Code) | | Creates an empty PropertyListConfiguration object which can be
used to synthesize a new plist file by adding values and
then saving().
|
PropertyListConfiguration | public PropertyListConfiguration(HierarchicalConfiguration c)(Code) | | Creates a new instance of PropertyListConfiguration and
copies the content of the specified configuration into this object.
Parameters: c - the configuration to copy since: 1.4 |
PropertyListConfiguration | public PropertyListConfiguration(String fileName) throws ConfigurationException(Code) | | Creates and loads the property list from the specified file.
Parameters: fileName - The name of the plist file to load. throws: ConfigurationException - Error while loading the plist file |
PropertyListConfiguration | public PropertyListConfiguration(File file) throws ConfigurationException(Code) | | Creates and loads the property list from the specified file.
Parameters: file - The plist file to load. throws: ConfigurationException - Error while loading the plist file |
PropertyListConfiguration | public PropertyListConfiguration(URL url) throws ConfigurationException(Code) | | Creates and loads the property list from the specified URL.
Parameters: url - The location of the plist file to load. throws: ConfigurationException - Error while loading the plist file |
quoteString | String quoteString(String s)(Code) | | Quote the specified string if necessary, that's if the string contains:
- a space character (' ', '\t', '\r', '\n')
- a quote '"'
- special characters in plist files ('(', ')', '{', '}', '=', ';', ',')
Quotes within the string are escaped.
Examples:
- abcd -> abcd
- ab cd -> "ab cd"
- foo"bar -> "foo\"bar"
- foo;bar -> "foo;bar"
|
Fields inherited from org.apache.commons.configuration.HierarchicalConfiguration | final public static int EVENT_ADD_NODES(Code)(Java Doc) final public static int EVENT_CLEAR_TREE(Code)(Java Doc)
|
|
|