Or use http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/util/EntityUtils.html#toByteArray(org.apache.http.HttpEntity) and then decode that directly