public class UnicodeProperties extends HashMap<String,String>
This is a rewrite of java.util.Properties that is not synchronized and natively supports non-ASCII encodings. It can also be configured to be "safe", allowing the values to have new line characters. When stored to a given BufferedWriter, "safe" properties will replace all new line characters with a _SAFE_NEWLINE_CHARACTER_.
In its current form, this is not intended to replace java.util.Properties for reading properties flat files. This class is not thread-safe.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
UnicodeProperties() |
UnicodeProperties(boolean safe) |
Modifier and Type | Method and Description |
---|---|
void |
fastLoad(String props) |
String |
getProperty(String key) |
String |
getProperty(String key,
String defaultValue) |
protected int |
getToStringLength()
Deprecated.
As of 7.0.0, with no direct replacement
|
boolean |
isSafe() |
void |
load(String props) |
void |
put(String line) |
String |
put(String key,
String value) |
void |
putAll(Map<? extends String,? extends String> map) |
String |
remove(Object key) |
String |
setProperty(String key,
String value) |
String |
toSortedString()
Deprecated.
As of 7.0.0, replaced by
toString() |
String |
toString() |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
equals, hashCode
public UnicodeProperties()
public UnicodeProperties(boolean safe)
public void fastLoad(String props)
public boolean isSafe()
public void load(String props) throws IOException
IOException
public void put(String line)
@Deprecated public String toSortedString()
toString()
public String toString()
toString
in class AbstractMap<String,String>
@Deprecated protected int getToStringLength()