mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 5959d27181c8a5b7e7f87b3da8001b8ba397a0b5
16 lines
497 B
Java
16 lines
497 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.nio.charset.StandardCharsets;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Demo {
|
|
private static void test(InputStream is) {
|
|
try (Stream<String> stream = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)).lines()) {
|
|
stream.forEach(System.out::println);
|
|
}
|
|
}
|
|
}
|