code: public static <T> T requestParamaterToObject(HttpServletRequest request, Class<T> c, String charset) {
  
          Map<String, String> map = new HashMap<>();
  
          String query = request.getQueryString();
  
          if (query != null) {
              String[] params = query.split("&");
  
              for (String param : params) {
                  if (param == null || param.indexOf('=') < 0) {
                      continue;
                  }
                  String pv[] = param.split("=");
                  if (pv.length != QUERY_PARAM_SPLIT_SIZE) {
                      continue;
                  }
  
                  String value = pv[1];
  
                  try {
                      value = URLDecoder.decode(pv[1], charset);
                  } catch (UnsupportedEncodingException e) {
                      log.info("unsupport encoding : " + pv[1]);
                      value = pv[1];
                  }
  
                  map.put(pv[0], value);
              }
          }
  
          return c.cast(mapToObject(map, c));
  
      }
docs: Request paramater to object t.
  
  @param <T>     the type parameter
  @param request the request
  @param c       the c
  @param charset the charset
  @return the t