使用httpclient非常简单。这是本教程的链接。
http://hc.apache.org/httpcomponents-client-
ga/tutorial/html/fundamentals.html#d5e43
HttpClient httpclient = new DefaultHttpClient();HttpGet httpget = new HttpGet(urltofetch);HttpResponse response = httpclient.execute(httpget);HttpEntity entity = response.getEntity();if (entity != null) { long len = entity.getContentLength(); InputStream inputStream = entity.getContent(); // write the file to whether you want it.}


