System::IO::Stream::ReadAsync 方法
内容
[
隐藏
]Stream::ReadAsync(const ArrayPtr<uint8_t>&, int32_t, int32_t) method
异步从当前流读取一系列字节,按读取的字节数前进流中的位置,并监视取消请求。
RTaskPtr<int32_t> System::IO::Stream::ReadAsync(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t count)
| 参数 | 类型 | 描述 |
|---|---|---|
| buffer | const ArrayPtr<uint8_t>& | 用于写入读取字节的字节数组。 |
| offset | int32_t | 在 buffer 中的 0 基位置,表示写入的起始位置。 |
| count | int32_t | 要读取的字节数。 |
ReturnValue
表示异步读取操作的任务。TResult 参数的值包含读取到 buffer 中的字节总数。如果当前可用的字节数少于请求的字节数,则结果值可能小于请求的字节数;如果已到达流的末尾,则结果值可能为 0(零)。
另见
- Typedef RTaskPtr
- Typedef ArrayPtr
- Class Stream
- Namespace System::IO
- Library Aspose.Font for C++
Stream::ReadAsync(const ArrayPtr<uint8_t>&, int32_t, int32_t, const Threading::CancellationToken&) method
异步从当前流读取一系列字节,按读取的字节数前进流中的位置,并监视取消请求。
virtual RTaskPtr<int32_t> System::IO::Stream::ReadAsync(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t count, const Threading::CancellationToken &cancellationToken)
| 参数 | 类型 | 描述 |
|---|---|---|
| buffer | const ArrayPtr<uint8_t>& | 用于写入读取字节的字节数组。 |
| offset | int32_t | 在 buffer 中的 0 基位置,表示写入的起始位置。 |
| count | int32_t | 要读取的字节数。 |
| cancellationToken | const Threading::CancellationToken& | 用于监视取消请求的令牌。 |
ReturnValue
表示异步读取操作的任务。TResult 参数的值包含读取到 buffer 中的字节总数。如果当前可用的字节数少于请求的字节数,则结果值可能小于请求的字节数;如果已到达流的末尾,则结果值可能为 0(零)。
另见
- Typedef RTaskPtr
- Typedef ArrayPtr
- Class CancellationToken
- Class Stream
- Namespace System::IO
- Library Aspose.Font for C++