BufferedReader一个一个读文件的字符时,如何判断已读到文件结束,也就是说文件结束的标志是什么?

解决方案 »

  1.   

    应该是返回null的时候表示结束了,在官方文档中有的Returns the next line of text available from this reader. A line is represented by zero or more characters followed by '\n', '\r', "\r\n" or the end of the reader. The string does not include the newline sequence.Returns:
    the contents of the line or null if no characters were read before the end of the reader has been reached.