Android异步请求网络上的图片,返回数据为数据流

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

private class ErweimaAsyncTask extends AsyncTask<String, Integer, String>{
 
        @Override
        protected String doInBackground(String... paramArray) {
             
            URL picUrl;
            try {
                picUrl = new URL(Constant.ERWEIMA_URL + "?timestimp=" + new Date().getTime() + "&code=BILLID_" + globalVariables.getCurrentBillId());
                pngBM = BitmapFactory.decodeStream(picUrl.openStream());  
                 
            } catch (MalformedURLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } 
            return "";
        }
         
        @Override
        protected void onPostExecute(String result) {
            erweimaImg.setImageBitmap(pngBM); 
        }
     
    }