public void run() {
try {
URL url = new URL(mUrlName);
HttpURLConnection fileConection = (HttpURLConnection) url.openConnection();
fileConection.setRequestMethod("GET");
fileConection.setReadTimeout(8000);
fileConection.setConnectTimeout(8000);
InputStream is = fileConection.getInputStream();
int TotalLen = fileConection.getContentLength();
Bitmap bitmap = BitmapFactory.decodeStream(is);
Message message = Message.obtain();
message.what = 10008;
message.obj = bitmap;
//mHandler.sendMessage(message);
mHandler.sendMessage(message);//此处在编辑器里显红,说明没有此方法
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException E){
E.printStackTrace();
}
}
目前暂无任何回答
- 0 回答
- 0 关注
- 1327 浏览
添加回答
举报
0/150
提交
取消