I have a byte array which looks like this:
[0, 0, 0, 0, 0, 0, 0, 0, 122, 98, 117, 54, 46, 0, 0, 115, 122, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 121, 116,
You can use a String(byte[],Charset) constructor and specify a Charset to be used to decode this array of bytes:
bytes
System.out.println(new String(byteArray, StandardCharsets.UTF_8));
In most cases, StandardCharsets.UTF_8 is a default charset.