public static ParameterList createFromQueryString(String queryString) throws MessageException {
  if (DEBUG)   _log.debug("Creating parameter list from query string: " + queryString);
  ParameterList parameterList=new ParameterList();
  StringTokenizer tokenizer=new StringTokenizer(queryString,"&");
  while (tokenizer.hasMoreTokens()) {
    String keyValue=tokenizer.nextToken();
    int posEqual=keyValue.indexOf('=');
    if (posEqual == -1)     throw new MessageException("Invalid query parameter, = missing: " + keyValue);
    try {
      String key=URLDecoder.decode(keyValue.substring(0,posEqual),"UTF-8");
      String value=URLDecoder.decode(keyValue.substring(posEqual + 1),"UTF-8");
      parameterList.set(new Parameter(key,value));
    }
 catch (    UnsupportedEncodingException e) {
      throw new MessageException("Cannot URL decode query parameter: " + keyValue,e);
    }
  }
  return parameterList;
}

public static ParameterList createFromQueryString ( String queryString ) throws MessageException { if ( DEBUG ) _log . debug ( "Creating parameter list from query string: " + queryString ) ; ParameterList parameterList = new ParameterList ( ) ; StringTokenizer tokenizer = new StringTokenizer ( queryString , "&" ) ; while ( tokenizer . hasMoreTokens ( ) ) { String keyValue = tokenizer . nextToken ( ) ; int posEqual = keyValue . indexOf ( '=' ) ; if ( posEqual == - 1 ) throw new MessageException ( "Invalid query parameter, = missing: " + keyValue ) ; try { String key = URLDecoder . decode ( keyValue . substring ( 0 , posEqual ) , "UTF-8" ) ; String value = URLDecoder . decode ( keyValue . substring ( posEqual + 1 ) , "UTF-8" ) ; parameterList . set ( new Parameter ( key , value ) ) ; } catch ( UnsupportedEncodingException e ) { throw new MessageException ( "Cannot URL decode query parameter: " + keyValue , e ) ; } } return parameterList ; }
create a parameter list based on a url encoded http query string .
