mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
20 lines
459 B
Java
20 lines
459 B
Java
// "Replace with 'StandardCharsets.US_ASCII'" "true"
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
class Test {
|
|
void test(byte[] bytes) {
|
|
String string = null;
|
|
try {
|
|
string = new String(bytes, "ASC<caret>II");
|
|
}
|
|
catch (UnsupportedEncodingException exception) {
|
|
exception.printStackTrace();
|
|
}
|
|
catch (Throwable t) {
|
|
return;
|
|
}
|
|
if(string.startsWith("Foo")) {
|
|
System.out.println("It's a foo!");
|
|
}
|
|
}
|
|
} |