public static void main(String[] args) { try { // 文件流甚是牛逼 Stream<String> stream = Files.lines(Paths.get("pom.xml")); stream.forEach(System.out::println); } catch (IOException e) { e.printStackTrace(); } }
public static void main(String[] args) { try { // 文件流甚是牛逼 Stream<String> stream = Files.lines(Paths.get("pom.xml")); stream.forEach(System.out::println); } catch (IOException e) { e.printStackTrace(); } }
转载于:https://www.cnblogs.com/huanglei2010/p/11173948.html