code: public static Map<String, String[]> createParameterMap(Map<String, ?> params) {
  
          if (params == null) {
              return null;
          }
          Map<String, String[]> result = new HashMap<String, String[]>();
          Iterator<?> i = params.entrySet().iterator();
          while (i.hasNext()) {
              @SuppressWarnings("unchecked")
              Map.Entry<String, ?> entry = (Entry<String, ?>)i.next();
              String key = entry.getKey();
              Object values = entry.getValue();
              if (values instanceof String[]) {
                  result.put(key, (String[])values);
              } else {
                  if (values != null) {
                      result.put(key, new String[] {values.toString()});
                  }
              }
          }
          return result;
      }
docs: Creates a valid request parameter map from the given map,
  most notably changing the values form <code>String</code>
  to <code>String[]</code> if required.<p>
  
  If the given parameter map is <code>null</code>, then <code>null</code> is returned.<p>
  
  @param params the map of parameters to create a parameter map from
  @return the created parameter map, all values will be instances of <code>String[]</code>