Package org.apache.wiki.util
Class PropertiesUtils
java.lang.Object
org.apache.wiki.util.PropertiesUtils
some useful methods for properties
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringsaveConvert(String string, boolean encodeWhiteSpace) Encodes a property file string from a supplied key/value line.static StringGenerates a property file line from a supplied key and value.static StringtoSortedString(Properties properties) like Properties.store, but stores the properties in sorted order
-
Method Details
-
toSortedString
like Properties.store, but stores the properties in sorted order
- Parameters:
properties- the properties object- Returns:
- String the properties, nicely formatted
-
toLine
Generates a property file line from a supplied key and value.- Parameters:
key- the property's keyvalue- the property's value- Returns:
- the converted string
-
saveConvert
Encodes a property file string from a supplied key/value line.- Parameters:
string- the string to encodeencodeWhiteSpace-trueif whitespace should be encoded also- Returns:
- the converted string
-