InputStreamReader : 字节流,通向字符流的桥梁
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("a.txt"),"gbk"));
也就是说,最底层是字节输入流,是FileInputStream,然后FileInputStream通过InputStreamReader这个类,
被转换成了 BufferedReader,
FileInputStream ----》InputStreamReader ----》BufferedReader
所以说,InputStreamReader 是 字节流,通向字符流的桥梁
OutputStreamWriter:字符流,通向字节流的桥梁
|
|