一、资源相关

二、路径与文件

读文件:

String fileName = "str.txt";
Files.lines(Paths.get(fileName), StandardCharsets.UTF_8).forEach(System.out::println);
List<String> out = Files.readAllLines(Paths.get(fileName));
// 按行读
private static void readFile(String fileName) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(new File(fileName)));
        String line;
        Set<String> readOnlyPath = new TreeSet<>();
        Set<String> otherPath= new TreeSet<>();
        while ((line = br.readLine()) != null) {
            System.out.println(line);
            getOpenPathList(line, readOnlyPath, otherPath);
        }
        br.close();
    }

写文件:

Files.write(Paths.get("output1.txt"), content.getBytes());

三、数据解析

相关文章:

  • 2021-06-18
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2021-06-03
  • 2021-09-25
  • 2021-07-01
  • 2021-06-04
相关资源
相似解决方案