UTF-8 encoding/decoding utility. More...
Public Member Functions | |
Utf8 () | |
Static Public Member Functions | |
static String | decode (fm.liveswitch.DataBuffer buffer) |
Decodes a UTF-8 data buffer to a string. More... | |
static String | decode (byte[] input) |
Decodes a UTF-8 byte array to a string. More... | |
static String | decode (byte[] input, int index, int length) |
Decodes a UTF-8 byte array to a string. More... | |
static byte[] | encode (String input) |
Encodes a string to a UTF-8 byte array. More... | |
static int | getByteCount (String input) |
Gets the number of bytes that would be returned by a call to encode. More... | |
UTF-8 encoding/decoding utility.
fm.liveswitch.Utf8.Utf8 | ( | ) |
|
static |
Decodes a UTF-8 byte array to a string.
input | The input byte array. |
|
static |
Decodes a UTF-8 byte array to a string.
input | The input byte array. |
index | The index to start reading. |
length | The length. |
|
static |
Decodes a UTF-8 data buffer to a string.
buffer | The input byte array. |
|
static |
Encodes a string to a UTF-8 byte array.
input | The input string. |
|
static |
Gets the number of bytes that would be returned by a call to encode.
input | The input string. |