/**
* Returns a string representing the body content.
*/
public String getString()
{
TempCharBuffer head = _tempStream.getHead();
if (head == null || head.getBuffer().length == 0)
return "";
int bomLength = 0;
if (head.getBuffer()[0] == 0xfeff)
bomLength = 1;
if (head.getNext() == null)
return new String(head.getBuffer(), bomLength, head.getLength() - bomLength);
int length = 0;
for (; head != null; head = head.getNext())
length += head.getLength();
char []buf = new char[length];
int offset = 0;
for (head = _tempStream.getHead(); head != null; head = head.getNext()) {
char []cbuf = head.getBuffer();
int sublen = head.getLength();
System.arraycopy(cbuf, 0, buf, offset, sublen);
offset += sublen;
}