HttpClient
利用HttpClient 得到页面内容方法:
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(“http://www.google.com”);
HttpResponse response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
String htmlContent=EntityUtils.toString(entity);
System.out.prinln(htmlContent); ///这样便得到Google页面Html
更有用的是HttpClient 还提供了模拟浏览器登录。