你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MultiBufferMemoryStream.Read(Byte[], Int32, Int32) 方法

定义

从当前流中读取字节块并将数据写入缓冲区。

public override int Read(byte[] buffer, int offset, int count);
override this.Read : byte[] * int * int -> int
Public Overrides Function Read (buffer As Byte(), offset As Integer, count As Integer) As Integer

参数

buffer
Byte[]

此方法返回时,该缓冲区包含指定的字节数组,该数组的偏移量和(偏移量 + 计数 - 1)之间的值由从当前源中读取的字节替换。

offset
Int32

缓冲区中从零开始的字节偏移量,从此处开始存储从当前流中读取的数据。

count
Int32

要读取的最多字节数。

返回

读入缓冲区中的总字节数。 如果当前可用的字节数没有请求的字节数那么多,则总字节数可能小于请求的字节数;如果已到达流的末尾,则为零。

适用于