URL url = new URL("http://125.60.29.90/sp/jsp/culvoucher/CULRetrieveGrteFg.jsp?ssn='"+nmb.getUSER_REG_NUMBER()+"'");  
  HttpURLConnection http = (HttpURLConnection) url.openConnection();  
  http.connect();  
  InputStream urlstream = http.getInputStream();  
  BufferedReader l_reader = new BufferedReader(new InputStreamReader(urlstream));  
  String currentLine=null;
  String totalstring=null;
  while ((currentLine = l_reader.readLine()) != null){
   totalstring += currentLine; 
  }
  System.out.println("-------------"+totalstring);
  String target=null;
  if(totalstring.length()>1){
   target=totalstring.substring(4);
  }else{
   target=totalstring;
  }
  System.out.println(target);
	
posted on 2009-01-22 22:23 
长春语林科技 阅读(205) 
评论(0)  编辑  收藏  所属分类: 
util