9 6 2 Input Stream WriterInput Stream Reader

  • Slides: 29
Download presentation

9 -6 -2 二進位檔案的讀寫-轉換成字 元串流 位元組串流如果需要轉換成字元串流,我們需要 使用Input. Stream. Writer/Input. Stream. Reader串流 當作過濾器,將位元組串流過濾成字元串流,如 下所示: Buffered.

9 -6 -2 二進位檔案的讀寫-轉換成字 元串流 位元組串流如果需要轉換成字元串流,我們需要 使用Input. Stream. Writer/Input. Stream. Reader串流 當作過濾器,將位元組串流過濾成字元串流,如 下所示: Buffered. Output. Stream bos=new Buffered. Output. Stream( new File. Output. Stream(file)); Output. Stream. Writer output = new Output. Stream. Writer(bos); ……… Buffered. Input. Stream bis=new Buffered. Input. Stream( new File. Input. Stream(file)); Input. Stream. Reader input = new Input. Stream. Reader(bis); ………