Board logo

标题: Java发送HTTP请求和提取数据的Java代码 [打印本页]

作者: qingqing3721    时间: 2011-7-13 23:19     标题: Java发送HTTP请求和提取数据的Java代码

Java发送HTTP请求和提取数据的Java代码:




view plaincopy to clipboardprint?import java.io.BufferedReader;   import java.io.InputStreamReader;   import java.URL;   public class Main {   public static void main(String[] args)  {   try {   URL my_url = new URL("xasxt/");   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();   }   }   }  import java.io.BufferedReader;import java.io.InputStreamReader;import java.URL;public class Main {public static void main(String[] args)  {try {URL my_url = new URL(xasxt/);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();}}}
TAG:
Java代码
提取数据文章由姿美堂整理,收集辛苦,希望能保留出处,谢谢斑竹大哥。




欢迎光临 编程开发论坛 (http://bbs.lihuasoft.net/) Powered by Discuz! 6.0.0