public String readFully() { StringBuilder stringBuilder = new StringBuilder(); while (hasNext()) { stringBuilder.append(UTF_8.decode(next().content())); } return stringBuilder.toString(); }
protected String readLogFully(final ClientResponse logs) throws IOException { final LogReader logReader = new LogReader(logs.getEntityInputStream()); StringBuilder stringBuilder = new StringBuilder(); LogMessage logMessage; while ((logMessage = logReader.nextMessage()) != null) { stringBuilder.append(UTF_8.decode(logMessage.content())); } logReader.close(); return stringBuilder.toString(); }