WriteAsync()

Stream::WriteAsync(const ArrayPtr<uint8_t>&, int32_t, int32_t, const Threading::CancellationToken&) method

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

virtual TaskPtr System::IO::Stream::WriteAsync(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t count, const Threading::CancellationToken &cancellationToken)

Arguments

ParameterTypeDescription
bufferconst ArrayPtr<uint8_t>&The array containing the bytes to write.
offsetint32_tA 0-based index of the elemnet in buffer at which the subrange to write begins.
countint32_tThe number of elements in the subrange to write.
cancellationTokenconst Threading::CancellationToken&The token to monitor for cancellation requests.

Return Value

A task that represents the asynchronous write operation.

Stream::WriteAsync(const ArrayPtr<uint8_t>&, int32_t, int32_t) method

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

TaskPtr System::IO::Stream::WriteAsync(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t count)

Arguments

ParameterTypeDescription
bufferconst ArrayPtr<uint8_t>&The array containing the bytes to write.
offsetint32_tA 0-based index of the elemnet in buffer at which the subrange to write begins.
countint32_tThe number of elements in the subrange to write.

Return Value

A task that represents the asynchronous write operation.

See Also