mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 06:44:20 +07:00
GitOrigin-RevId: 5959d27181c8a5b7e7f87b3da8001b8ba397a0b5
17 lines
531 B
Java
17 lines
531 B
Java
// "Replace with 'StandardCharsets.UTF_8'" "true"
|
|
import java.io.BufferedReader;
|
|
import java.io.InputStream;
|
|
import java.io.InputStreamReader;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Demo {
|
|
private static void test(InputStream is) {
|
|
try (Stream<String> stream = new BufferedReader(new InputStreamReader(is, "<caret>UTF-8")).lines()) {
|
|
stream.forEach(System.out::println);
|
|
} catch (UnsupportedEncodingException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
}
|