锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品99视频,欧美一区二区在线,亚洲欧洲国产一区http://www.aygfsteel.com/stevenjohn/category/53198.html閭d簺闈掓槬鐨勫瞾鏈?/description>zh-cnSun, 06 Jan 2013 13:38:31 GMTSun, 06 Jan 2013 13:38:31 GMT60HttpUrlConnection GEThttp://www.aygfsteel.com/stevenjohn/archive/2013/01/06/393886.htmlabinabinSun, 06 Jan 2013 13:36:00 GMThttp://www.aygfsteel.com/stevenjohn/archive/2013/01/06/393886.htmlhttp://www.aygfsteel.com/stevenjohn/comments/393886.htmlhttp://www.aygfsteel.com/stevenjohn/archive/2013/01/06/393886.html#Feedback0http://www.aygfsteel.com/stevenjohn/comments/commentRss/393886.htmlhttp://www.aygfsteel.com/stevenjohn/services/trackbacks/393886.htmlpackage com.abin.lii.han.limei;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

import org.junit.Test;

public class ImediaRegisterTest {
 @Test
 public void testImediaRegister(){
  String LIMEI_HTTP="  String appId="fk000";
  String udid="3A5S4D6F8G9K_3596140444464123";
  String requestUrl=LIMEI_HTTP+"?app="+appId+"&udid="+udid+"&source="+"where"";
  System.out.println(requestUrl);
  String result="";
  try {
   URL url=new URL(requestUrl);
   HttpURLConnection connection=(HttpURLConnection)url.openConnection();
   connection.setDoOutput(true);
   connection.setDoInput(true);
   connection.setRequestMethod("GET");
   connection.setUseCaches(false);
   // URLConnection.setInstanceFollowRedirects鏄垚鍛樺嚱鏁幫紝浠呬綔鐢ㄤ簬褰撳墠鍑芥暟
   connection.setInstanceFollowRedirects(false);
   connection.setRequestProperty("Content-Type",
                "application/x-www-form-urlencoded");
   connection.connect();
   //鍙戦佹墽琛岃姹?br />   
   //鎺ユ敹榪斿洖璇鋒眰
   BufferedReader reader=new BufferedReader(new InputStreamReader(connection.getInputStream(),"GBK"));
   String line="";
   StringBuffer buffer=new StringBuffer();
   while((line=reader.readLine())!=null){
    buffer.append(line);
   }
   result=buffer.toString();
   System.out.println("result="+result);
   connection.disconnect();
  } catch (Exception e) {
   e.printStackTrace();
  }
 }

}



abin 2013-01-06 21:36 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 郑州市| 鄯善县| 乐都县| 连城县| 九台市| 隆德县| 五大连池市| 浦城县| 万宁市| 乌拉特后旗| 会昌县| 周口市| 修武县| 德庆县| 庐江县| 潜江市| 抚远县| 上高县| 承德县| 洪雅县| 孝昌县| 塘沽区| 会理县| 宿松县| 汉中市| 安义县| 仲巴县| 桐乡市| 左贡县| 西乌珠穆沁旗| 乳源| 崇义县| 雷波县| 峨山| 静安区| 夏邑县| 河南省| 汕尾市| 赫章县| 吉首市| 林州市|