【正文】
文件的順序訪問。 內(nèi)存的訪問 ByteArrayInputStream和 ByteArrayOutputStream 為提高安全而禁止任何程序直接對內(nèi)存進(jìn)行操作。 ( 5)盡量保持對象串行化的簡單扼要,但可以進(jìn)行擴(kuò)展和定制。 目的: ( 1) 支持 Java的對象持續(xù)性 。 25要考慮異常處理。 根據(jù)數(shù)據(jù)源和輸入輸出的任務(wù)建立字節(jié)或字符流。 12 打印輸出字符流 PrintWriter提供字符流的輸出處理。 write(String str)。 String getEncoding() public void colse() 10 文件輸入輸出字符流 ? FileReader和 FileWriter是InputStreamReader和 OutputStreamWriter的子類。 PrintStream類 9 輸入輸出字符流 常用的是 InputStreamReader和 OutputStreamWriter : InputStreamReader( InputStream in) 。 (5)關(guān)閉 FileInputStream流 。 5 輸入輸出類層次 I n p u t S t r e a mD a t a I n p u t S t r e a mL i n e N u m b e r I n p u t S t r e a mB u f f e r e d I n p u t S t r e a mP u s h b a c k I n p u t S t r e a mF i l t e r I n p u t S t r e a mS t r i n g B u f f e r I n p u t S t r e a mS e q u e n c e I n p u t S t r e a mP i p e d I n p