C# FileStream.Read Method
Reads a block of bytes from the stream and writes the data in a given buffer.
public override int Read( byte[] array, int offset, int count )
Parameters
- array
- Type: System.Byte[]
When this method returns, contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
- offset
- Type: System.Int32
The byte offset in array at which the read bytes will be placed.
- count
- Type: System.Int32
The maximum number of bytes to read.
Return Value
Type: System.Int32The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached.
Exception | Condition |
---|---|
ArgumentNullException |
array is null. |
ArgumentOutOfRangeException |
offset or count is negative. |
NotSupportedException |
The stream does not support reading. |
IOException |
An I/O error occurred. |
ArgumentException |
offset and count describe an invalid range in array. |
ObjectDisposedException |
Methods were called after the stream was closed. |
最後更新:2017-04-03 20:19:23
上一篇:
C# 對Word文檔進行處理
下一篇:
ListView異步加載優化
Ubuntu10.04 32位編譯Android 4.0源碼
關於靜態方法
Android手機在不同分辨率情況下字體自適應大小
阿裏雲發布企業級ECS產品線,國內首個上線Skylake CPU+25G實例
專訪iDST NLP負責人——淘寶內容搜索、評價歸納的幕後英雄
阿裏雲傾力扶持技術社區 CDN流量免費放送
用數字化數據戰略取代數據“收集和管理”
並發工具類(四)兩個線程進行數據交換的Exchanger
轉載~ 耐思尼克 http://www.iisp.com/ztview/ID_10895_zh.html 多域名綁定一個空間的方法
阿裏雲推薦碼2017卷土重來--雲大使Cotyun.cn分享7月份可用的阿裏雲八折推薦碼