mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 11:07:43 +07:00
15 lines
395 B
Java
15 lines
395 B
Java
// "Replace with 'StandardCharsets.UTF_16'" "true"
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
class Test {
|
|
static final String UTF16 = "UTF-16";
|
|
|
|
void test(byte[] bytes) {
|
|
String string = null;
|
|
string = new String(bytes, StandardCharsets.UTF_16);
|
|
if(string.startsWith("Foo")) {
|
|
System.out.println("It's a foo!");
|
|
}
|
|
}
|
|
} |