title: Reading directly from an std::istream into an std::string
body: <p>Is there anyway to read a known number of bytes, directly into an std::string, without creating a temporary buffer to do so?</p>
  
  <p>eg currently I can do it by</p>
  
  <pre><code>boost::uint16_t len;
  is.read((char*)&amp;len, 2);
  char *tmpStr = new char[len];
  is.read(tmpStr, len);
  std::string str(tmpStr, len);
  delete[] tmpStr;
  </code></pre>