Answers for "file read utf-8 java"

0

java file reader utf 8

// Java 7
  BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8);

  // Java 8
  List<String> list = Files.readAllLines(path, StandardCharsets.UTF_8);

  // Java 8
  Stream<String> lines = Files.lines(path, StandardCharsets.UTF_8);

  // Java 11
  String s = Files.readString(path, StandardCharsets.UTF_8);
Posted by: Guest on November-09-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language