Made it clear that charToBytes returns UTF16.
This commit is contained in:
parent
6decb2b234
commit
a615545adc
|
@ -297,7 +297,7 @@ class Sys {
|
|||
*/
|
||||
@SuppressWarnings("NumericCastThatLosesPrecision")
|
||||
public static
|
||||
byte[] charToBytes(char[] text) {
|
||||
byte[] charToBytes16(char[] text) {
|
||||
// NOTE: this saves the char array in UTF-16 format of bytes.
|
||||
byte[] bytes = new byte[text.length * 2];
|
||||
for (int i = 0; i < text.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user