語言

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

定義

開始異步寫入作業。 (考慮改用這個 WriteAsync(Byte[], Int32, Int32) 方法。)

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);
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

一個使用者提供的物件,用來區分此特定非同步寫入請求與其他請求。

傳回

一個代表非同步寫入操作的物件,該操作可能仍在待處理中。

例外狀況

該方法嘗試在串流結束後非同步寫入,或發生磁碟錯誤。

一或多個引數無效。

方法在溪流關閉後才被呼叫。

目前 BrotliStream 的實作不支援寫入操作。

寫入操作無法執行,因為串流是封閉的。

適用於