ZLibStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) 方法

定义

开始异步写操作。

public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ asyncCallback, System::Object ^ asyncState);
public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState);
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginWrite (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

一个用户提供的对象,它将该特定的异步写入请求与其他请求区别开来。

返回

表示异步写入操作(可能仍处于挂起状态)的对象。

例外

buffernull

offset 小于零。

offsetcount 已超出数组的边界。

- 或 -

count 大于从 offsetbuffer 末尾的元素数。

适用于