流的技術總結

2021-07-22 08:08:34 字數 1278 閱讀 3946

節點流:可以從乙個特定的資料來源(節點)讀取資料;

處理流:是連線在已存在的流(節點流或處理流)之上,通過對資料的處理為程式提供跟那個強大的讀寫功能;

1.file.canwrite() ----是否可寫;

2.file.exists()----是否存在;

3.file.canread()----是否可寫;

4.file.length()----位元組長度;

5.file.lastmodified()----修改的時間,返回乙個lang型的資料;

6.file.isdirectory()----是否是乙個目錄;

7.file.isfile()----是否為標準檔案;

1.int  read()throws toexception;

2.void  close() throws ioexception;

3.int  read(byte buffer) throws ioexception;

4.int  read(byte buffer, int off,int len) throws ioexception; 1.

int   weite()  throws toexception;

2.void  close() throws ioexception;

3.int  weite() (byte  buffer) throws ioexception;

4.int  weite() (byte  buffer, int off,int len) throws ioexception;

5.void flush()  throws ioexception;

1.int  read()throws toexception;

2.void  close() throws ioexception;

3.int  read(byte buffer) throws ioexception;

4.int  read(byte buffer, int off,int len) throws ioexception;

1.int   weite()  throws toexception;

2.void  close() throws ioexception;

3.int  weite() (byte  buffer) throws ioexception;

4.int  weite() (byte  buffer, int off,int len) throws ioexception;

5.void flush()  throws ioexception;

IO流的總結

io流中物件很多,每次在解決問題 處理裝置上的資料時 時都會困惑,到底該用哪個物件呢?下面把io流的常用物件進行了規律的總結 四個明確 明確二 要操作的資料還是位元組還是文字呢?目的 明確三 明確資料所在的具體裝置。目的裝置 明確四 是否需要額外功能 位元組流 字元流 方法 向檔案中寫入資料的過程 ...

流技術小結

按照資料流的方向分,分為輸入流和輸出流 按照處理資料的單位來分,分為位元組流和字元流 按照功能來分,分為節點流和處理流 inputstream 位元組輸入流,實現類 fileinputstream outputstream 位元組輸出流,實現類 fileoutputstream file file ...

網路流總結

今天學的網路流,總的感覺來說稍難,不管是理解還是什麼,但是理解了後,就變得簡單許多。ford fulkerson演算法 是來求最大流量問題,從源點出發,到匯點,到底能多少能流入匯點。演算法 1 從源點出發,找相鄰邊,如果相鄰邊未被找過並且還可以流入流量就dfs。2 更新流入的邊。3 重複操作,直到沒...