String address = "http://sports.sina.com.cn/nba/live.html?id=2015050405";
        URL url = new URL(address);
        HttpURLConnection connection = (HttpURLConnection)url.openConnection();
        InputStreamReader input = new InputStreamReader(connection.getInputStream(), "utf-8");
        BufferedReader reader = new BufferedReader(input);
        String line = "";
        StringBuffer stringBuffer = new StringBuffer();
        while((line = reader.readLine()) != null){
            stringBuffer.append(line);
        }
        
        String string = stringBuffer.toString();

 

相关文章:

  • 2021-08-16
  • 2022-12-23
  • 2021-08-16
  • 2021-06-20
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2022-02-11
相关资源
相似解决方案