关键词搜索

源码搜索 ×
×

C# FileStream.Read Method

发布2014-03-05浏览2105次

详情内容

Reads a block of bytes from the stream and writes the data in a given buffer.

  1. public override int Read(
  2. byte[] array,
  3. int offset,
  4. int count
  5. )

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.Int32
The 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.


相关技术文章

最新源码

下载排行榜

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载