摘要: HttpURLConnection 取百度首页URLConnection urlc = new URL("http://www.baidu.com/") .openConnection();System.out.println(urlc.getContentType());InputStream is = urlc.getInputStream();BufferedReader bf = new BufferedReader(new InputStreamReader(is,"gbk"));getContentType() 值为:text/html;ch 阅读全文
posted @ 2012-05-24 10:55 adai_m 阅读(841) 评论(0) 推荐(0) 编辑