// 传输网络图片
public
Bitmap getPic(String uriPic) {
URL imageUrl =
null
;
Bitmap bitmap =
null
;
try
{
imageUrl =
new
URL(uriPic);
}
catch
(MalformedURLException e) {
e.printStackTrace();
}
try
{
HttpURLConnection conn = (HttpURLConnection) imageUrl
.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
bitmap = BitmapFactory.decodeStream(is);
is.close();
}
catch
(IOException e) {
e.printStackTrace();
}
return
bitmap;
}