linkurl = new URL(project.getProjectUrl());
System.out.print("!!!!!!!!!!!");
link=(HttpURLConnection)linkurl.openConnection();
hsmap=link.getHeaderFields();
itorate=hsmap.keySet().iterator();
while(itorate.hasNext()){
temp=(String)itorate.next();
list=(List)hsmap.get(temp);
for(int i=0;i<list.size();i++){
responsestr+=list.get(i);
}
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(responsestr.toUpperCase().indexOf(" 200 OK")>=0){
//正常 并记录日志
System.out.println("正常");这样可以吗 ?
System.out.print("!!!!!!!!!!!");
link=(HttpURLConnection)linkurl.openConnection();
hsmap=link.getHeaderFields();
itorate=hsmap.keySet().iterator();
while(itorate.hasNext()){
temp=(String)itorate.next();
list=(List)hsmap.get(temp);
for(int i=0;i<list.size();i++){
responsestr+=list.get(i);
}
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(responsestr.toUpperCase().indexOf(" 200 OK")>=0){
//正常 并记录日志
System.out.println("正常");这样可以吗 ?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货