code: public static void parseQueryProperties(String q, Properties props) throws MalformedURLException {
          if (q == null || q.length() == 0) {
              return;
          }
          for (StringTokenizer iter = new StringTokenizer(q, "&");
              iter.hasMoreElements();) {
              String pair = iter.nextToken();
              int split = pair.indexOf('=');
              if (split <= 0) {
                  throw new RuntimeException("Invalid pair [" + pair  + "] in query string [" + q + "]");
              } else {
                  String tempKey = pair.substring(0, split);
                  String tempValue = pair.substring(split + 1);
                  StringBuilder key = new StringBuilder(tempKey.length());
                  StringBuilder value = new StringBuilder(tempValue.length());
                  try {
                      URLCodec.decode(tempKey, key);
                      URLCodec.decode(tempValue, value);
                  } catch (IOException e) {
                      throw new MalformedURLException("Invalid encoding in [" + pair + "] in query string [" + q + "]");
                  }
                  props.setProperty(key.toString(), value.toString());
              }
          }
      }
docs: Tool function: queries a query string and adds the key/value pairs to the specified
  properties map
  
  @param q String
  @param toAddTo Properties