java核心技术卷二13页:“在javaSE5.0之前,处理文本输入的唯一方式就是通过BufferReader类,它拥有一个readLine方法可以使我们读入一行文本。你需要将带缓冲区的读入器与输入源组合起来。
oracle api :Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.***Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient.
所以BufferReader是不能直接从文件读数据的,只能从字符流里面读数的。 |