0
을 반환 .consume (httpResponse.getEntity()). EntityUtils.toString (httpResponse.getEntity())에 대한 호출이 완벽하게 정상적으로 작동하는 반면 코드에서 IOException이 발생합니다. 문제가 무엇인지에 대한 아이디어가 있습니까? 또는 IOException을 수정하기위한 제안 사항이 있습니까?EntityUtils 내가 EntityUtils.consume에 대한 호출을 만드는 중이라서 내 프로그램에서 IOException이
if(status >= 200 && status < 300) {
HttpEntity httpEntity = httpResponse.getEntity();
if (httpEntity != null) {
if(httpEntity.getContentLength() > Constants.HTTP.MAX_APP_CONTENT_LENGTH) {
throw new IllegalArgumentException("HTTP entity too large.");
}
result = EntityUtils.toString(httpEntity,"UTF-8");
EntityUtils.consume(httpEntity);
}
}