try {
HttpResponse response = client.execute(method);
is = response.getEntity().getContent();
} catch (IOException e) {
throw new RippleException(e);
}
try {
//load image
img = ImageIO.read(is);
} catch (IOException e) {
throw new RippleException(e);
} finally {
try {
is.close();
} catch (IOException e) {
throw new RippleException(e);
}
}
if (null == img) {
throw new RippleException("no displayable image found at URI " + uri);
}
}