public class SortedProperties
extends java.util.Properties
| Constructor and Description |
|---|
SortedProperties() |
| Modifier and Type | Method and Description |
|---|---|
static SortedProperties |
fromLines(java.lang.String s)
Convert a String to a map.
|
static boolean |
getBooleanProperty(java.util.Properties prop,
java.lang.String key,
boolean def)
Get a boolean property value from a properties object.
|
static int |
getIntProperty(java.util.Properties prop,
java.lang.String key,
int def)
Get an int property value from a properties object.
|
java.util.Enumeration<java.lang.Object> |
keys() |
static SortedProperties |
loadProperties(java.lang.String fileName)
Load a properties object from a file.
|
void |
store(java.lang.String fileName)
Store a properties file.
|
java.lang.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, stringPropertyNamesclear, 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, valuespublic java.util.Enumeration<java.lang.Object> keys()
keys in class java.util.Hashtable<java.lang.Object,java.lang.Object>public static boolean getBooleanProperty(java.util.Properties prop,
java.lang.String key,
boolean def)
prop - the properties objectkey - the keydef - the default valuepublic static int getIntProperty(java.util.Properties prop,
java.lang.String key,
int def)
prop - the properties objectkey - the keydef - the default valuepublic static SortedProperties loadProperties(java.lang.String fileName) throws java.io.IOException
fileName - the name of the properties filejava.io.IOExceptionpublic void store(java.lang.String fileName)
throws java.io.IOException
fileName - the target file namejava.io.IOExceptionpublic java.lang.String toLines()
public static SortedProperties fromLines(java.lang.String s)
s - the string