管道流-piped stream
public
class
io62_1
}class
input/*輸入*/ implements
runnable
public
void run()catch(exception e)
}}class
output/*輸出*/ implements
runnable
public
void run() catch (exception e)
}}
操作基本型別資料的流物件-datastream
1.操作基本資料型別
dateinputstream 與dateoutputstream
2.操作位元組陣列
bytearrayinputstream 與bytearrayoutputstream
3.操作字元陣列
chararrayreader 與chararraywrite
4.操作字串
stringreader與stringwriter
public
class
io63_1
private
static
void
readdata() throws ioexception
public
static
void
writedata() throws ioexception
}
運算元組的流
public
class io64_1
system.out.println(bos.tostring());
}}
其他的IO流
列印流 printwriter 字元輸出 printstream 位元組輸出 總結 有writer 和reader 都是字元流 列印流在實現自動換行和重新整理要做true處理 列印流一般結合bufferreader和bufferedinputstream一起使用 普通寫入 printwriter p...
IO包中的其他物件 編碼
一 io包中的其他物件 1 randomaccessfile 封裝了位元組流 特點 可以對數字進行讀和寫的操作,通過建構函式的第二個引數模式來區分讀寫 r rw 好處 對於規則的資料,可以通過指標的偏移進行隨機的資料獲取.方法 seek skipbytes getfilepointer 注意 如果在...
c 的IO流 檔案流物件
1 c語言的輸入輸出 c語言常用scanf 從標準輸入讀取資料,並將其存放至變數 printf 將指定文字 字串輸出到標準輸出裝置,設定輸出寬度和精度 輸入輸出緩衝區 1 遮蔽低階io實現 2 可實現行讀取 2 c 的io流 1 流,是是對一種有序連續且具有方向性的資料 其單位可以bit,byte,...