java.lang.Object | |||||||
字 节 | java.io.InputStream | ① | System.in的返回值 | InputStream is = System.in; | |||
java.io.FileInputStream | |||||||
java.io.ObjectInputStream | |||||||
java.io.BufferedInputStream | |||||||
java.io.OutputStream | A | OutputStream os = System.out; | |||||
java.io.FileOutputStream | |||||||
java.io.ObjectOutputStream | |||||||
java.io.BufferedOutputStream | |||||||
java.io.PrintStream | 字节打印流 | System.out的返回值 | PrintStream os = System.out; | ||||
字 符 | java.io.Reader | ||||||
java.io.InputStreamReader | ② | 字节流通向字符流的桥梁 | 构造方法参数为 InputStream | InputStreamReader isr = new InputStreamReader(is) | |||
java.io.FileReader | |||||||
java.io.BufferedReader | ③ | 定义该对象的过程是①②③ | 构造方法参数为 Reader | BufferedReader br = new BufferedReader(isr) | |||
java.io.Writer | |||||||
java.io.OutputStreamWriter | B | 是字符流通向字节流的桥梁 | 构造方法参数为 OutputStream | OutputStreamWriter osw = new OutputStreamWriter(os) | |||
java.io.FileWriter | |||||||
java.io.BufferedWriter | C | 定义该对象的过程是 ABC | 构造方法参数为 FileWriter | BufferedWriter bw = new BufferedWriter(osw) | |||
java.io.PrintWriter | 字符打印流 | 构造方法参数为 File,OutputStream, String,Writer | PrintWriter pw = new PrintWriter("a.txt"); |
22.jpg (169.09 KB, 下载次数: 1)
打印流全例图
笨小点儿 发表于 2015-5-22 00:08
好清晰的感觉,谢谢
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |