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

定義

開始非同步的讀取作業。 (請考慮使用 ReadAsync(Byte[], Int32, Int32) 方法替代。)

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

使用者所提供的物件,其可以從其他要求中區分出這個特定非同步讀取的要求。

傳回

物件,表示可能還在暫止中的非同步讀取作業。

例外狀況

嘗試非同步讀取的方法超越資料流結尾,或發生了磁碟錯誤。

一或多個引數無效。

關閉資料流後呼叫了方法。

目前的 BrotliStream 實作不支援讀取作業。

無法完成此呼叫。

適用於