question: 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 ( ) ) ; }
target:  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.