按方向可分為輸入流輸出流
按處理單位可分為字節流和字符流
按功能可分為節點流和處理流
>## 字節流
```
FileInputStream(File file | String source);
FileOutputStream(File file | String target);
// 字節數組流
ByteArrayInputStream(byte[] buf);
ByteArrayOutputStream(int size); // 默認緩沖區32字節
// 對象流
ObjectInputStream(InputStream is);
ObjectOutputStream(OutputStream os);
// 字節緩沖流,緩存,提高效率
BufferedInputStream(InputStream is, int size);
BufferedOutputStream(OutputStream os, int size);
```
>## 字符流
```
FileReader(File file | String source);
FileWriter(String target | File file, boolean append);
// 字符緩沖流
BufferedReader(Reader r, int size);
BufferedWriter(Writer w, int size);
// 字節字符橋接流
InputStreamReader(InputStream is, String character);
OutputStreamWriter(OutputStream os, String charater);
PrintWriter(String target, String character)
```
*****
**tip**
- 輸入輸出流一般成對出現。
- io流的關閉原則是“先打開,后關閉”,或者根據依賴原則,先關閉處理流,再關閉節點流。
- 2111總結
- 1.面向對象
- 1.0.1 super()與this()的區別
- 1.0.2 private、default、protected、public的訪問范圍
- 1.0.3 continue、break、return區別
- 1.0.4 重載和重寫的區別
- 1.0.5 final的特點
- 1.0.6 抽象類與接口的區別
- 1.0.7 java類型
- 1.0.8 什么是反射
- 1.0.9 類的加載機制
- 1.1.1 jvm內存結構
- 1.1.2 java垃圾回收機制
- 1.1.3 并發問題
- 1.1.3.1 線程的狀態與關系
- 1.1.3.2 并發的三大性質
- 1.1.3.3 線程的實現與使用
- 1.1.3.4 線程池相關
- 1.1.3.5 并發相關方法
- 1.1.3.6 線程相關工具
- 1.1.4 jdk8特性
- 1.1.4.1 lambad表達式的使用
- 1.1.4.2 stream API
- 1.1.4.3 Optional容器使用
- 1.1.4.4 LocalDateTime
- 1.15 io流
- 1.16 動態代理實現
- 2.JavaEE
- 2.0.1 JSP四大作用域九大內置對象
- 2.0.2 cookie與session的區別
- 4.數據庫相關
- 5.git版本管理
- 7.一些問題解決
- 7.1 分布式鎖如何實現