Package com.avoka.core.util
Class CharsetUtils
java.lang.Object
com.avoka.core.util.CharsetUtils
Provides charset encoding utilities.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
decodeFromUTF8Bytes
(byte[] value) Convert the given UTF-8 encoded byte array to a string.static byte[]
encodeAsUTF8Bytes
(String value) Convert the given string to a UTF-8 encoded byte array.
-
Field Details
-
UTF_8
The 'UTF-8' charset encoding constant.- See Also:
-
-
Constructor Details
-
CharsetUtils
public CharsetUtils()
-
-
Method Details
-
encodeAsUTF8Bytes
Convert the given string to a UTF-8 encoded byte array.- Parameters:
value
- the string value to encode (required, not null)- Returns:
- the UTF-8 encoded byte array
-
decodeFromUTF8Bytes
Convert the given UTF-8 encoded byte array to a string.- Parameters:
value
- the the UTF-8 encoded byte array (required, not null)- Returns:
- the decoded string value
-