FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) メソッド

定義

非同期の書き込み操作を開始します。 代わりに WriteAsync(Byte[], Int32, Int32, CancellationToken) を使用することを検討してください。

public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ array, int offset, int numBytes, AsyncCallback ^ callback, System::Object ^ state);
public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ callback, System::Object ^ state);
public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ array, int offset, int numBytes, AsyncCallback ^ userCallback, System::Object ^ stateObject);
public override IAsyncResult BeginWrite (byte[] array, int offset, int numBytes, AsyncCallback? callback, object? state);
public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state);
public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state);
public override IAsyncResult BeginWrite (byte[] array, int offset, int numBytes, AsyncCallback callback, object state);
public override IAsyncResult BeginWrite (byte[] array, int offset, int numBytes, AsyncCallback callback, object? state);
public override IAsyncResult BeginWrite (byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject);
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginWrite (array As Byte(), offset As Integer, numBytes As Integer, callback As AsyncCallback, state As Object) As IAsyncResult
Public Overrides Function BeginWrite (buffer As Byte(), offset As Integer, count As Integer, callback As AsyncCallback, state As Object) As IAsyncResult
Public Overrides Function BeginWrite (array As Byte(), offset As Integer, numBytes As Integer, userCallback As AsyncCallback, stateObject As Object) As IAsyncResult

パラメーター

arraybuffer
Byte[]

現在のストリームに書き込むデータを格納しているバッファー。

offset
Int32

現在のストリームへのバイトのコピーを開始する位置を示す array 内のバイト オフセット。インデックス番号は 0 から始まります。

numBytescount
Int32

書き込む最大バイト数。

callbackuserCallback
AsyncCallback

非同期の書き込み操作が完了したときに呼び出されるメソッド。

statestateObject
Object

この特定の非同期書き込み要求を他の要求と区別するために使用するユーザー指定のオブジェクト。

戻り値

非同期の書き込みを参照するオブジェクト。

例外

array の長さから offset を引いた長さが numBytes 未満です。

arraynullです。

offset または numBytes が負の値です。

ストリームは書き込みをサポートしません。

ストリームは閉じられています。

I/O エラーが発生しました。

適用対象