【发布时间】:2016-08-24 10:51:34
【问题描述】:
URL imageUrl = new URL("http://192.168.0.103:8080/mm/showImage?id=2&fileName=fesc1cc.JPG&imgType=books" );
//URL imageUrl = new URL(url);
HttpURLConnection conn = (HttpURLConnection) imageUrl
.openConnection();
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
StringBuffer buffer = new StringBuffer();
String inputLine;
while ((inputLine = in.readLine()) != null)
buffer.append(inputLine);
in.close();
conn.getResponseCode();
System.out.println(conn.getResponseCode());
System.out.println(buffer.toString());
conn.disconnect();
如何将收到的数据转换为位图并在图像视图中显示。
【问题讨论】:
标签: android bitmap android-bitmap