Skip to content

how to convert the aws::iostream to char array or other std type  #1532

@GitZinger

Description

@GitZinger

Confirm by changing [ ] to [x] below:

Platform/OS/Hardware/Device
What are you running the sdk on?
win 10
Describe the question
after calling

auto& retrieved_file = get_object_outcome.GetResultWithOwnership().
           GetBody();

I realize this retrieved_file is aws::iostream type, and I would like to convert it into a std type so that I can use the raw data to construct a opencv Mat variable?
so uint8_t, char and whatever a regular std type would be good!

by calling
get()
or read()
like
retrieved_file.get

or something?

also, how to get the size of this retrieved_file ?

I mean I checked the documentation
https://sdk.amazonaws.com/cpp/api/LATEST/namespace_aws.html#a7fceacd06044b767f90ef1ae53f498d8

It is not that kind helpful.
I don't know what kind of member method or function associated with the iostream class at all. could you put its member function in the reference.

thank you so much!

Logs/output
If applicable, add logs or error output.

To enable logging, set the following system properties:

REMEMBER TO SANITIZE YOUR PERSONAL INFO

options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
Aws::InitAPI(options)

Metadata

Metadata

Assignees

Labels

closing-soonThis issue will automatically close in 4 days unless further comments are made.guidanceQuestion that needs advice or information.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions