added more sys utils
This commit is contained in:
parent
6d79f15ed7
commit
a1a5b73c59
|
@ -414,6 +414,19 @@ class Sys {
|
|||
return bytes;
|
||||
}
|
||||
|
||||
public static
|
||||
byte[] charToBytesRaw(char[] chars) {
|
||||
int length = chars.length;
|
||||
byte[] bytes = new byte[length];
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
char charValue = chars[i];
|
||||
bytes[i] = (byte) charValue;
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static
|
||||
int[] bytesToInts(byte[] bytes) {
|
||||
int length = bytes.length;
|
||||
|
|
Loading…
Reference in New Issue