code: public static Map<String, String> splitAsMap(String source, String paramDelim, String keyValDelim) {
  
          int keyValLen = keyValDelim.length();
          // use LinkedHashMap to preserve the order of items
          Map<String, String> params = new LinkedHashMap<String, String>();
          Iterator<String> itParams = CmsStringUtil.splitAsList(source, paramDelim, true).iterator();
          while (itParams.hasNext()) {
              String param = itParams.next();
              int pos = param.indexOf(keyValDelim);
              String key = param;
              String value = "";
              if (pos > 0) {
                  key = param.substring(0, pos);
                  if ((pos + keyValLen) < param.length()) {
                      value = param.substring(pos + keyValLen);
                  }
              }
              params.put(key, value);
          }
          return params;
      }
docs: Splits a String into substrings along the provided <code>paramDelim</code> delimiter,
  then each substring is treat as a key-value pair delimited by <code>keyValDelim</code>.<p>
  
  @param source the string to split
  @param paramDelim the string to delimit each key-value pair
  @param keyValDelim the string to delimit key and value
  
  @return a map of splitted key-value pairs