ZLibStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
开始异步读取操作。
public:
override IAsyncResult ^ BeginRead(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ asyncCallback, System::Object ^ asyncState);
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState);
override this.BeginRead : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginRead (buffer As Byte(), offset As Integer, count As Integer, asyncCallback As AsyncCallback, asyncState As Object) As IAsyncResult
参数
- buffer
- Byte[]
要将数据读入的字节数组。
- offset
- Int32
从流中开始读取数据的字节偏移量 buffer 。
- count
- Int32
要读取的最大字节数。
- asyncCallback
- AsyncCallback
一个可选的异步回调,在读取操作完成时调用。
- asyncState
- Object
用户提供的对象,用于区分此特定异步读取请求与其他请求。
返回
表示异步读取操作的对象,该操作仍可能挂起。
例外
buffer 是 null。
offset 小于零。
-或-
offset 并且 count 超出数组的边界。
-或-
count 大于从 offset 元素到末尾的 buffer元素数。