笨笨
独学而无友,则孤陋而寡闻

如果不使用代理:
       

 URL url0 = new URL(url);
            HttpURLConnection httpConnection 
= (HttpURLConnection) url0
                                               .openConnection();
            responseCode 
= httpConnection.getResponseCode();

    

使用代理:

System.getProperties()
                  .put(
"proxySet""true");

   System.getProperties()
                 .put(
"proxyHost""dfdfdf"); // your proxy host 
           System.getProperties()
                 .put(
"proxyPort""1234"); // your proxy port 
posted on 2005-12-10 11:45  笨笨  阅读(716)  评论(1编辑  收藏  举报