使用缓冲的读取器从包装在Path中的URI读取
import java.io.BufferedReader; import java.io.IOException; import java.net.URI;/**from n o w j a v a . c o m**/ import java.net.URISyntaxException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; public class Main { public static void main(String[] args) { try (BufferedReader inputReader = Files.newBufferedReader(Paths.get(new URI("file:///C:/home/docs/users.txt")), Charset.defaultCharset())) { String inputLine;/* 来 自 N o w J a v a . c o m - 时 代 Java*/ while ((inputLine = inputReader.readLine()) !=