-
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();
-
is.close();
-
return bm;
-
} catch (IOException e) {
-
Log.d("DEBUGTAG", "Oh noooz an error...");
-
}
-
return null;
-
}
Android 加载服务器上的图片
最新推荐文章于 2021-11-26 20:04:50 发布