锘??xml version="1.0" encoding="utf-8" standalone="yes"?>中文字幕亚洲精品视频,日本国产亚洲,亚洲精品国产美女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 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 宝鸡市| 铁岭市| 吉水县| 湘西| 双江| 汨罗市| 涟源市| 富裕县| 兴隆县| 岳池县| 甘德县| 光泽县| 神农架林区| 全椒县| 全南县| 华容县| 遂溪县| 罗定市| 九江市| 宁都县| 宿州市| 溧阳市| 台中县| 华亭县| 文昌市| 龙口市| 柞水县| 邻水| 法库县| 马关县| 东丰县| 蓝田县| 尤溪县| 曲靖市| 南陵县| 桂东县| 仁寿县| 铁力市| 诸暨市| 汕头市| 沙坪坝区|