std::stringstream efficient way to get written data, copy to another stream
<p>Without writing a custom rdbuf is there any way to use a stringstream efficiently?  That is, with these requirements:</p>

<ul>
<li>the stream can be reset and writing start again without deallocating previous memory</li>
<li>get a const char* to the data written (along with the length) without creating a temporary</li>
<li>populate the stream without creating a temporary string</li>
</ul>

<p>If somebody can give me a definitive "no" that would be great.</p>

<p>Now, I also use boost, so if somebody can provide a boost alternative which does this that would be great. It <em>has</em> to have both istream and ostream interfaces available.</p>
