public String asString() throws IOException {
  long len=getContentLength();
  ByteArrayOutputStream buf;
  if (0 < len) {
    buf=new ByteArrayOutputStream((int)len);
  }
 else {
    buf=new ByteArrayOutputStream();
  }
  writeTo(buf);
  return decode(buf.toByteArray(),getCharacterEncoding());
}

public String asString ( ) throws IOException { long len = getContentLength ( ) ; ByteArrayOutputStream buf ; if ( 0 < len ) { buf = new ByteArrayOutputStream ( ( int ) len ) ; } else { buf = new ByteArrayOutputStream ( ) ; } writeTo ( buf ) ; return decode ( buf . toByteArray ( ) , getCharacterEncoding ( ) ) ; }
return a copy of the result as a string . < p > the default version of this method copies the result into a temporary byte array and then tries to decode it using the configured encoding .
