9.Java发送HTTP请求和提取数据
try { URL my_url = new URL("www.baidu.com/"); BufferedReader br = new BufferedReader(new InputStreamReader(my_url .openStream())); String strTemp = ""; while (null != (strTemp = br.readLine())) { System.out.println(strTemp); } } catch (Exception ex) { ex.printStackTrace(); }