docs: public static Map<String, String[]> createParameterMap(String query, boolean decodeParameters, String encoding) {
  
          if (CmsStringUtil.isEmpty(query)) {
              // empty query
              return new HashMap<String, String[]>();
          }
          if (query.charAt(0) == URL_DELIMITER.charAt(0)) {
              // remove leading '?' if required
              query = query.substring(1);
          }
          // cut along the different parameters
          String[] params = CmsStringUtil.splitAsArray(query, PARAMETER_DELIMITER);
          Map<String, String[]> parameters = new HashMap<String, String[]>(params.length);
          for (int i = 0; i < params.length; i++) {
              String key = null;
              String value = null;
              // get key and value, separated by a '='
              int pos = params[i].indexOf(PARAMETER_ASSIGNMENT);
              if (pos > 0) {
                  key = params[i].substring(0, pos);
                  value = params[i].substring(pos + 1);
              } else if (pos < 0) {
                  key = params[i];
                  value = "";
              }
              // adjust the key if it starts with "amp;"
              // this happens when "&amp;" is used instead of a simple "&"
              if ((key != null) && (key.startsWith(AMP))) {
                  key = key.substring(AMP.length());
              }
              // now make sure the values are of type String[]
              if (key != null) {
                  if (decodeParameters) {
                      key = CmsEncoder.decode(key, encoding);
                      value = CmsEncoder.decode(value, encoding);
                  }
                  String[] values = parameters.get(key);
                  if (values == null) {
                      // this is the first value, create new array
                      values = new String[] {value};
                  } else {
                      // append to the existing value array
                      String[] copy = new String[values.length + 1];
                      System.arraycopy(values, 0, copy, 0, values.length);
                      copy[copy.length - 1] = value;
                      values = copy;
                  }
                  parameters.put(key, values);
              }
          }
          return parameters;
      }