protected String getEntityString(HttpResponse response) {
if (!isTimedOut() && !hasErrored() && !isCancelled()) {
try {
return EntityUtils.toString(response.getEntity());
} catch (org.apache.http.ParseException e) {
exception = new OperationException(OperationErrorType.GENERAL,
"Bad http headers");
errored = true;
} catch (IOException e) {
exception = new OperationException(OperationErrorType.GENERAL,
"Error reading response");
errored = true;
} catch (IllegalArgumentException e) {
exception = new OperationException(OperationErrorType.GENERAL,
"No entity");
errored = true;
}
}
return null;