public class UTF8CharacterConverter extends AbstractCharacterConverter
To use this class, you can call
totalcross.sys.Convert.setDefaultConverter("UTF8");
Modifier | Constructor and Description |
---|---|
protected |
UTF8CharacterConverter() |
Modifier and Type | Method and Description |
---|---|
char[] |
bytes2chars(byte[] bytes,
int start,
int length)
Convert UTF-8 bytes to UCS-2 characters
|
byte[] |
chars2bytes(char[] chars,
int start,
int length)
Convert UCS-2 characters to UTF-8 bytes
|
contains, newDecoder, newEncoder
public char[] bytes2chars(byte[] bytes, int start, int length)
bytes2chars
in class AbstractCharacterConverter
bytes
- byte array to convertstart
- first byte to convert in the byte arraylength
- number of bytes to convertpublic byte[] chars2bytes(char[] chars, int start, int length)
chars2bytes
in class AbstractCharacterConverter
chars
- character array to convertstart
- first character to convert in the character arraylength
- number of characters to convert