jirglt


 private String getKobe(String mburl)
 {
       URL url = null;
       BufferedReader reader = null;
       String str="";
       try
       {
               url = new URL(mburl);
               reader = new BufferedReader(new InputStreamReader(url.openStream(),"UTF-8"));
               String line=null;
               do
               {
                        line = reader.readLine();
                        if(line!=null)
                        {
                                str +=line;
                        }
                }
                while(line!=null);
         }
         catch (Exception e)
        {
               System.out.println("查询地址解析错误,"+e.getMessage());
               return "callfail";
        } 
        finally
       {
               if(reader != null)
              {
                     try
                     {
                             reader.close();
                     }
                     catch (IOException e)
                     {
                              e.printStackTrace();
                     }
                }
         }

          return str;

  }

分类:

技术点:

相关文章:

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