BrotliStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) 方法
定义
开始异步写操作。Begins an asynchronous write operation. (请考虑改用 WriteAsync(Byte[], Int32, Int32) 方法。)(Consider using the WriteAsync(Byte[], Int32, Int32) method instead.)
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[]
要向其中写入数据的缓冲区。The buffer from which data will be written.
- offset
- Int32
array 中的字节偏移量,从该偏移量开始写入从流中读取的数据。The byte offset in array at which to begin writing data from the stream.
- count
- Int32
最多写入的字节数。The maximum number of bytes to write.
- asyncCallback
- AsyncCallback
可选的异步回调,在完成写入操作时调用。An optional asynchronous callback, to be called when the write operation is complete.
- asyncState
- Object
一个用户提供的对象,它将该特定的异步写入请求与其他请求区别开来。A user-provided object that distinguishes this particular asynchronous write request from other requests.
返回
表示异步写入操作(可能仍处于挂起状态)的对象。An object that represents the asynchronous write operation, which could still be pending.
例外
尝试异步写入超过流的结尾的方法或发生错误的磁盘。The method tried to write asynchronously past the end of the stream, or a disk error occurred.
一个或多个自变量无效。One or more of the arguments is invalid.
在流关闭后调用方法。Methods were called after the stream was closed.
当前 BrotliStream 实现不支持写入操作。The current BrotliStream implementation does not support the write operation.
由于流已关闭,因此无法执行写入操作。The write operation cannot be performed because the stream is closed.