protected Response handleResponse(HttpURLConnection conn, Message outMessage,
Class<?> responseClass, Type genericType) {
try {
ResponseBuilder rb = setResponseBuilder(conn, outMessage.getExchange());
Response currentResponse = rb.clone().build();
Object entity = readBody(currentResponse, outMessage, responseClass, genericType,
new Annotation[]{});
rb.entity(entity instanceof Response
? ((Response)entity).getEntity() : entity);