解析过程:
1、先按“&”分割字符串
2、获取“=”后的值
public static String[] AnalysisCall(String str){
String str="&taskname=test111&poolid=111&phonenum=130000000";
String[] myList = new String[3];
String[] splitURL=str.split("&");
Map<String,Object> mapParam=new HashMap<String,Object>();
for(String s:splitURL){
if(s.indexOf("=")>0){
mapParam.put(s.substring(0, s.indexOf("=")),s.substring(s.indexOf("=")+1, s.length()));
}
}
int i=0;
for(Map.Entry<String, Object> entry:mapParam.entrySet()){
myList[i]=(String) entry.getValue();
i++;
System.out.println(entry.getKey()+"~~~"+entry.getValue());
}
return myList;
}