如果是BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("test.txt")));只需要br.close();
如果是InputStream is = new FileInputStream("test.txt");
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
则需要逐一关闭
br.close();
isr.close();
is.close();
|