public class SortedProperties extends Properties
defaults| 构造器和说明 |
|---|
SortedProperties() |
| 限定符和类型 | 方法和说明 |
|---|---|
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, 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 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 fileIOExceptionpublic void store(String fileName) throws IOException
fileName - the target file nameIOExceptionpublic String toLines()
public static SortedProperties fromLines(String s)
s - the stringCopyright © 2017. All rights reserved.