public static StringBuilder buildCommonParams(MultiValueMap<String,Object> paramMap,String encodeCharset){
  StringBuilder paramBuilder=new StringBuilder();
  Set<String> keySet=paramMap.keySet();
  for (  String key : keySet) {
    List<Object> values=paramMap.getValues(key);
    for (    Object value : values) {
      if (value != null && value instanceof CharSequence) {
        paramBuilder.append("&");
        try {
          paramBuilder.append(URLEncoder.encode(key,encodeCharset));
          paramBuilder.append("=");
          paramBuilder.append(URLEncoder.encode(value.toString(),encodeCharset));
        }
 catch (        UnsupportedEncodingException e) {
          Logger.e("Encoding " + encodeCharset + " format is not supported by the system");
          paramBuilder.append(key);
          paramBuilder.append("=");
          paramBuilder.append(value.toString());
        }
      }
    }
  }
  if (paramBuilder.length() > 0)   paramBuilder.deleteCharAt(0);
  return paramBuilder;
}

public static StringBuilder buildCommonParams ( MultiValueMap < String , Object > paramMap , String encodeCharset ) { StringBuilder paramBuilder = new StringBuilder ( ) ; Set < String > keySet = paramMap . keySet ( ) ; for ( String key : keySet ) { List < Object > values = paramMap . getValues ( key ) ; for ( Object value : values ) { if ( value != null && value instanceof CharSequence ) { paramBuilder . append ( "&" ) ; try { paramBuilder . append ( URLEncoder . encode ( key , encodeCharset ) ) ; paramBuilder . append ( "=" ) ; paramBuilder . append ( URLEncoder . encode ( value . toString ( ) , encodeCharset ) ) ; } catch ( UnsupportedEncodingException e ) { Logger . e ( "Encoding " + encodeCharset + " format is not supported by the system" ) ; paramBuilder . append ( key ) ; paramBuilder . append ( "=" ) ; paramBuilder . append ( value . toString ( ) ) ; } } } } if ( paramBuilder . length ( ) > 0 ) paramBuilder . deleteCharAt ( 0 ) ; return paramBuilder ; }
split joint non form data .
