org.apache.wiki.htmltowiki
Class PropertiesUtils

java.lang.Object
  extended by org.apache.wiki.htmltowiki.PropertiesUtils

public final class PropertiesUtils
extends Object

some usefull methods for properties

Version:
1.0

Method Summary
static String saveConvert(String string, boolean encodeWhiteSpace)
          Encodes a property file string from a supplied key/value line.
static String toLine(String key, String value)
          Generates a property file line from a supplied key and value.
static String toSortedString(Properties properties)
           like Properties.store, but stores the properties in sorted order
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toSortedString

public static String toSortedString(Properties properties)

like Properties.store, but stores the properties in sorted order

Parameters:
properties - the properties object
Returns:
String the properties, nicely formatted

toLine

public static String toLine(String key,
                            String value)
Generates a property file line from a supplied key and value.

Parameters:
key - the property's key
value - the property's value
Returns:
the converted string

saveConvert

public static String saveConvert(String string,
                                 boolean encodeWhiteSpace)
Encodes a property file string from a supplied key/value line.

Parameters:
string - the string to encode
encodeWhiteSpace - true if whitespace should be encoded also
Returns:
the converted string


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.