Skip to content

Instantly share code, notes, and snippets.

@ixiyang
Created March 22, 2014 07:33
Show Gist options
  • Save ixiyang/9702690 to your computer and use it in GitHub Desktop.
Save ixiyang/9702690 to your computer and use it in GitHub Desktop.
@Override
protected InputStream getStreamFromNetwork(String imageUri, Object extra) throws IOException {
HttpGet httpRequest = new HttpGet(imageUri);
HttpResponse response = httpClient.execute(httpRequest);
HttpEntity entity = response.getEntity();
BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity);
return bufHttpEntity.getContent();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment