1. public Bitmap getRemoteImage ( final URL aURL ) {
  2. try {
  3. final URLConnection conn = aURL. openConnection ( ) ;
  4. conn. connect ( ) ;
  5. final BufferedInputStream bis = new BufferedInputStream (conn. getInputStream ( ) ) ;
  6. final Bitmap bm = BitmapFactory. decodeStream (bis ) ;
  7. bis. close ( ) ;
  8. is. close ( ) ;
  9. return bm ;
  10. } catch ( IOException e ) {
  11. Log. d ( "DEBUGTAG", "Oh noooz an error..." ) ;
  12. }
  13. return null ;
  14. }


更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android browser 的几个小feature (四) k
  2. TextView字间距和行间距设置
  3. Android(安卓)Handler机制
  4. 使用AIDL实现Android的跨进程通信
  5. android checkbox,radiobox style自定义
  6. Phone拨号调起InCallUi流程(Phone 9.0 )(P
  7. android:configChanges属性总结
  8. Android(安卓)Drawable Importer的使用
  9. android开发环境
  10. Android(安卓)Studio failed to open by