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
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
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 © 2017 JBoss by Red Hat. All rights reserved.