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.
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 Judson (7.1.x), 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 Wilberforce (7.0.x), replaced by
toString() |
String |
toString() |
public UnicodeProperties()
public UnicodeProperties(boolean safe)
public void fastLoad(String props)
public String getProperty(String key)
public String getProperty(String key, String defaultValue)
public boolean isSafe()
public void load(String props) throws IOException
IOException
public void put(String line)
public String put(String key, String value)
put
in interface Map<String,String>
put
in class HashMap<String,String>
public void putAll(Map<? extends String,? extends String> map)
putAll
in interface Map<String,String>
putAll
in class HashMap<String,String>
public String remove(Object key)
remove
in interface Map<String,String>
remove
in class HashMap<String,String>
public String setProperty(String key, String value)
@Deprecated public String toSortedString()
toString()
public String toString()
toString
in class AbstractMap<String,String>
@Deprecated protected int getToStringLength()