Boost logo

Boost Users :

Subject: [Boost-users] Boost IOStream - Buffer as an input stream
From: Lloyd (lloydkl.tech_at_[hidden])
Date: 2014-11-03 12:14:13


Hi,

We am trying to use a buffer as an input stream. For that we have used
"basic_array_source" like this

boost::iostreams::basic_array_source<BYTE> source(mem_ptr,size);

boost::iostreams::stream<boost::iostreams::basic_array_source <BYTE>>
streamReader;

streamReader.open(source, std::ios::binary);

But this method does not give input-stream related methods (functions like
seekg), instead it give methods related to output stream (seekp). Can you
please tell what is wrong with this approach?

Thanks,
  Lloyd



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net