在使用OSS C++sdk时,使用了ObjectSample.h中的方法 ,PutObjectFromBuffer和GetObjectToBuffer
void ObjectSample::GetObjectToBuffer()
{
GetObjectRequest request(bucket_, "PutObjectFromBuffer");
auto outcome = client->GetObject(request);
if (outcome.isSuccess()) {
std::cout << __FUNCTION__ << " success, Content-Length:" << outcome.result().Metadata().ContentLength() << std::endl;
char str[1024];
*(outcome.result().Content()) >> str;
std::cout << str;
}
else {
PrintError(__FUNCTION__, outcome.error());
}
}
str中只能获取到文件的部分内容?
该如何解决