try (Stream<String> stream = Files.lines(Paths.get(fileName))) { stream.forEach(System.out::println); } String text = "Text to save to file"; Files.write(Paths.get("./fileName.txt"), text.getBytes());
Easiest way to read write files in java 8
猜你喜欢
转载自kaqi.iteye.com/blog/2397593
今日推荐
周排行