IO流
- 按流向分
- 输入流
- 字节输入流 InputStream FileInputStream
- 读数据方法:read()/read(byte[])/read(byte[],0,length)
- 缓冲字节输入流 BufferedInputStream
- 字符输入流 InputStreamReader(InputStream is) Reader FileReader
- 缓冲字符输入流BufferedReader
- String readLine()
- 输出流
- 字节输出流OutputStream FileOutputStream
- 写数据 write(int b)/write(byte[] b)/ write(byte[] b, int offset, int length)
- 缓冲字节输出流 BufferedOutputStream
- 字符输出流 OutputStreamWriter(OutputStream os) Writer FileWriter
- 缓冲字符输出流 BufferedWriter
- newLine()
|
|