Topic: Is there a ByteArrayOutputStream ByteArrayInputStream equivalent


Author: hap497 <hap497@gmail.com>
Date: Sat, 6 Feb 2010 12:04:43 CST
Raw View
Hi,

Is there a ByteArrayOutputStream ByteArrayInputStream equivalent in c+
+ library?
I am looking for class which are subclass of istream and ostream.
And for the istream, it can take a buffer as the input.
And for the ostream, it can write the content of the stream into a
buffer.

Thank you.

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Yechezkel Mett <ymett.on.usenet@gmail.com>
Date: Sun, 7 Feb 2010 18:52:22 CST
Raw View
On Feb 6, 8:04 pm, hap497 <hap...@gmail.com> wrote:
> Hi,
>
> Is there a ByteArrayOutputStream ByteArrayInputStream equivalent in c+
> + library?
> I am looking for class which are subclass of istream and ostream.
> And for the istream, it can take a buffer as the input.
> And for the ostream, it can write the content of the stream into a
> buffer.

Look at (i|o)strstream and (i|o)stringstream.

Yechezkel Mett


--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]