public class SortedProperties extends Properties
defaults
Constructor and Description |
---|
SortedProperties() |
Modifier and Type | Method and Description |
---|---|
static SortedProperties |
fromLines(String s)
Convert a String to a map.
|
static boolean |
getBooleanProperty(Properties prop,
String key,
boolean def)
Get a boolean property value from a properties object.
|
static int |
getIntProperty(Properties prop,
String key,
int def)
Get an int property value from a properties object.
|
Enumeration<Object> |
keys() |
static SortedProperties |
loadProperties(String fileName)
Load a properties object from a file.
|
void |
store(String fileName)
Store a properties file.
|
String |
toLines()
Convert the map to a list of line in the form key=value.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
public static boolean getBooleanProperty(Properties prop, String key, boolean def)
prop
- the properties objectkey
- the keydef
- the default valuepublic static int getIntProperty(Properties prop, String key, int def)
prop
- the properties objectkey
- the keydef
- the default valuepublic static SortedProperties loadProperties(String fileName) throws IOException
fileName
- the name of the properties fileIOException
public void store(String fileName) throws IOException
fileName
- the target file nameIOException
public String toLines()
public static SortedProperties fromLines(String s)
s
- the stringCopyright © 2012 JBoss by Red Hat. All Rights Reserved.