/** * Create {@link Content} out of HTTP response. */ protected Content createContent(final Context context, final HttpResponse response) { return new Content(new HttpEntityPayload(response, response.getEntity())); }
Content fetchedContent = new Content(new HttpEntityPayload(response, entity)); AttributesMap contentAttrs = fetchedContent.getAttributes(); contentAttrs.set(Content.CONTENT_LAST_MODIFIED, getDateHeader(response, HttpHeaders.LAST_MODIFIED));