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 實作不支援寫入作業。

無法執行寫入作業,因為資料流已關閉。

適用於