文件名称:android从网络上加载图片
文件大小:26KB
文件格式:DOC
更新时间:2014-10-08 10:13:30
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(); is.close(); return bm; } catch (IOException e) { Log.d("DEBUGTAG", "Oh noooz an error..."); } return null; }