103 HttpResponse response =
httpClient.execute(
new HttpGet(key.getLogoUri()));
105 HttpEntity entity = response.getEntity();
107 CachedImage image =
new CachedImage();
109 image.setContentType(entity.getContentType().getValue());
110 image.setLength(entity.getContentLength());
111 image.setData(IOUtils.toByteArray(entity.getContent()));
114 }
catch (IOException e) {
115 throw new IllegalArgumentException(
"Unable to load client image.");
HttpClient httpClient
Definition: InMemoryClientLogoLoadingService.java:87