Package org.apache.wiki.util

# Class PropertiesUtils

java.lang.Object
org.apache.wiki.util.PropertiesUtils

public final class PropertiesUtils extends Object
some useful methods for properties

Version:
  1.0

## Method Summary

Modifier and Type
Method
Description
`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 Details

### 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