我想逐行阅读这些文字:http://www.puzzlers.org/pub/wordlists/unixdict.txt
我试图得到一个流:
Stream<String> stream = Files.lines(Paths.get("http://www.puzzlers.org/pub/wordlists/unixdict.txt"));
stream.forEach((word) -> System.out.println(word));
//Close the stream and it's underlying file as well
stream.close();
Run Code Online (Sandbox Code Playgroud)
但我怀疑它只适用于文件.是否有类似的URL方法?