/** * Returns the result of the call as String. * * @return a String containing the complete result of the call * @throws IOException in case of any IO error */ public String getData() throws IOException { StringWriter writer = new StringWriter(); InputStreamReader reader = new InputStreamReader(getInput(), getContentEncoding()); CharStreams.copy(reader, writer); reader.close(); return writer.toString(); }