aOutputString.SetLength(aIn.pcount());
static void WriteFromOstrstream(ostrstream& aIn, nsString& aOutputString){  char* strData = aIn.str();	aOutputString.SetLength(0);		// empty the string	aOutputString += strData;  // in ostrstreams if you call the str() function  // then you are responsible for deleting the string  delete strData;}