Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想逐行阅读文本文件,AsynchronousFileChannel.read()使用CompletionHandler.
AsynchronousFileChannel.read()
CompletionHandler
我能找到的唯一可以逐行阅读的功能是BufferedReader.readLine(),但它与阅读器的阻塞特性相结合。
BufferedReader.readLine()
有没有类似的解决方案,或者我必须阅读整个文件,然后用 BufferedReader 包装它?