java file reader utf 8

Solutions on MaxInterview for java file reader utf 8 by the best coders in the world

showing results for - "java file reader utf 8"
Nohan
26 Jan 2016
1// Java 7
2  BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8);
3
4  // Java 8
5  List<String> list = Files.readAllLines(path, StandardCharsets.UTF_8);
6
7  // Java 8
8  Stream<String> lines = Files.lines(path, StandardCharsets.UTF_8);
9
10  // Java 11
11  String s = Files.readString(path, StandardCharsets.UTF_8);