* put these values into a hashtable for easy retrival
* @param params the CGI-querystring.
* @return a map with type->value maps for the CGI-querystring
*/
public SProperties splitArgs (String params) {
SProperties htab = new SProperties ();
StringTokenizer st = new StringTokenizer (params, "=&", true);
String key = null;
while (st.hasMoreTokens ()) {
String next = st.nextToken ();
if (next.equals ("=")) {
// nah..
} else if (next.equals ("&")) {
if (key != null) {
htab.put (key, "");
key = null;
}
} else if (key == null) {
key = next;
} else {
htab.put (key, Coder.URLdecode (next));
key = null;
}
}
return htab;
}