`

android 网络请求图片

阅读更多
public Bitmap getRemoteImage(final URL aURL) {
try {
final URLConnection conn = aURL.openConnection();
conn.connect();
final BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
final Bitmap bm = BitmapFactory.decodeStream(bis);
bis.close();
return bm;
} catch (IOException e) {
Log.d(\"DEBUGTAG\", \"Oh noooz an error...\");
}
return null;
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics