/** * Unframe and decode the HTTP message's body, then turn it into a String using the given charset. * * @param charset to use to convert the body into a String * @return the decoded message body as a String * @throws IOException if an error occurs while consuming the message body */ public String decodeBodyToString(Charset charset) throws IOException { return new String(decodeBody(), charset); }
/** * Unframe and decode the HTTP message's body, then turn it into a String using the given charset. * * @param charset to use to convert the body into a String * @return the decoded message body as a String * @throws IOException if an error occurs while consuming the message body */ public String decodeBodyToString(Charset charset) throws IOException { return new String(decodeBody(), charset); }