@Testpublic void fun2() {FileInputStream fis = null;InputStreamReader isd = null;try {//低端流绑定硬盘文件fis = new FileInputStream("c:/a.txt");//高端流(即字符流)绑定低端流isd = new InputStreamReader(fis);char[] buffer = new char[1024];//设置字符缓冲区while (true){int len = isd.read(buffer);if (len == -1){break;}String str = new String(buffer, 0, len);System.out.println(str);}} catch (Exception e) {// TODO: handle exception} finally {try {fis.close();} catch (Exception e) {throw new RuntimeException(e);}try{isd.close();}catch (Exception e) {throw new RuntimeException(e);}}}