Package com.liferay.portal.kernel.util
Class UnicodeProperties
Object
AbstractMap<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<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.
- Author:
- Alexander Chow
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionUnicodeProperties
(boolean safe) UnicodeProperties
(Map<String, String> map, boolean safe) -
Method Summary
Modifier and TypeMethodDescriptionvoid
getProperty
(String key) getProperty
(String key, String defaultValue) boolean
isSafe()
void
void
void
setProperty
(String key, String value) toString()
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Constructor Details
-
UnicodeProperties
public UnicodeProperties() -
UnicodeProperties
public UnicodeProperties(boolean safe) -
UnicodeProperties
-
-
Method Details
-
fastLoad
-
getProperty
-
getProperty
-
isSafe
public boolean isSafe() -
load
- Throws:
IOException
-
put
-
put
-
putAll
-
remove
-
setProperty
-
toString
- Overrides:
toString
in classAbstractMap<String,
String>
-