第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

java中的io流問題 FileInputStream中的read()返回的int類型是讀取字節(jié)的

java中的io流問題 FileInputStream中的read()返回的int類型是讀取字節(jié)的

慕尼黑5688855 2019-03-21 14:14:55
java中的io流問題FileInputStream中的read()返回的int類型是讀取字節(jié)的ASCLL編碼么?是一個一個字節(jié)讀?BufferedInputStream中的read()返回的是讀入字節(jié)的長度嗎?是一段一段的讀嗎?謝謝了,感覺好疑惑
查看完整描述

3 回答

?
慕運維8079593

TA貢獻1876條經(jīng)驗 獲得超5個贊

不是,兩個都是返回Ascll編碼,bufferInputStream是緩沖流,提高效率




查看完整回答
反對 回復 2019-03-29
?
蝴蝶刀刀

TA貢獻1801條經(jīng)驗 獲得超8個贊

FileInputStream是基礎類,字節(jié)流,按字節(jié)讀取。
BufferedInputStream是包裝類,處理流,先將數(shù)據(jù)讀于緩沖區(qū),然后再讀取

查看完整回答
反對 回復 2019-03-29
?
千巷貓影

TA貢獻1829條經(jīng)驗 獲得超7個贊

看源碼啊,F(xiàn)ileInputStream

/**
* Reads a byte of data from this input stream. This method blocks
* if no input is yet available.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* file is reached.
* @exception IOException if an I/O error occurs.
*/
public native int read() throws IOException;

BufferedInputStream

/**
* See
* the general contract of the <code>read</code>
* method of <code>InputStream</code>.
*
* @return the next byte of data, or <code>-1</code> if the end of the
* stream is reached.
* @exception IOException if this input stream has been closed by
* invoking its {@link #close()} method,
* or an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
public synchronized int read() throws IOException {
if (pos >= count) {
fill();
if (pos >= count)
return -1;
}
return getBufIfOpen()[pos++] & 0xff;
}



查看完整回答
反對 回復 2019-03-29
  • 3 回答
  • 0 關(guān)注
  • 1408 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號