mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
13 lines
306 B
Java
13 lines
306 B
Java
// "Replace with 'cs'" "true"
|
|
import java.nio.charset.*;
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
class X {
|
|
byte[] convert(String str, Charset cs) {
|
|
try {
|
|
return str.getBytes(<caret>cs.name());
|
|
} catch (UnsupportedEncodingException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
} |