Chernobyl

2014年2月18日 #

<Android>文件下载

摘要: 使用HTTP协议下载文件创建一个URL对象通过URL对象,创建一个HttpURLConnection对象调用getInputStream()方法得到InputStream对象从InputStream对象中读取数据 1 InputStream in = null; 2 try { 3 URL url = new URL(urlstr); 4 HttpURLConnection urlConn = (HttpURLConnection)url.openConnection(); 5 in = urlConn.getInputStream(); 6 } catch (Malf... 阅读全文

posted @ 2014-02-18 19:33 Chernobyl 阅读(265) 评论(0) 推荐(0) 编辑

导航