System::IO::Stream::Read 方法

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

从流中读取指定数量的字节并将其写入指定的字节数组。

virtual int32_t System::IO::Stream::Read(const ArrayPtr<uint8_t> &buffer, int32_t offset, int32_t count)=0
参数类型描述
bufferconst ArrayPtr<uint8_t>&用于写入读取字节的字节数组
offsetint32_tbuffer 中开始写入的 0 基位置
countint32_t要读取的字节数

ReturnValue

读取的字节数

另见

Stream::Read(const System::Details::ArrayView<uint8_t>&, int32_t, int32_t) method

从流中读取指定数量的字节并将其写入指定的字节数组。

virtual int32_t System::IO::Stream::Read(const System::Details::ArrayView<uint8_t> &buffer, int32_t offset, int32_t count)
参数类型描述
bufferconst System::Details::ArrayView<uint8_t>&用于写入读取字节的字节数组视图
offsetint32_tbuffer 中开始写入的 0 基位置
countint32_t要读取的字节数

ReturnValue

读取的字节数

另见

Stream::Read(const System::Details::StackArray<uint8_t, N>&, int32_t, int32_t) method

从流中读取指定数量的字节并将其写入指定的字节数组。

template<std::size_t> int32_t System::IO::Stream::Read(const System::Details::StackArray<uint8_t, N> &buffer, int32_t offset, int32_t count)
参数描述
N栈数组的大小
参数类型描述
bufferconst System::Details::StackArray<uint8_t, N>&用于写入读取字节的字节栈数组
offsetint32_tbuffer 中开始写入的 0 基位置
countint32_t要读取的字节数

ReturnValue

读取的字节数

另见