static public void addQueryParams(final StringBuilder urlString,final Map<String,String[]> requestParams) throws UnsupportedEncodingException {
  if (requestParams == null)   return;
  boolean first=true;
  for (  Map.Entry<String,String[]> e : requestParams.entrySet()) {
    final String name=e.getKey();
    final String[] vals=e.getValue();
    if (vals == null) {
      urlString.append(first ? "?" : "&");
      first=false;
      urlString.append(URLEncoder.encode(name,RemoteRepository.UTF8));
    }
 else {
      for (      String val : vals) {
        urlString.append(first ? "?" : "&");
        first=false;
        urlString.append(URLEncoder.encode(name,RemoteRepository.UTF8));
        urlString.append("=");
        if (val != null)         urlString.append(URLEncoder.encode(val,RemoteRepository.UTF8));
      }
    }
  }
}

static public void addQueryParams ( final StringBuilder urlString , final Map < String , String [ ] > requestParams ) throws UnsupportedEncodingException { if ( requestParams == null ) return ; boolean first = true ; for ( Map . Entry < String , String [ ] > e : requestParams . entrySet ( ) ) { final String name = e . getKey ( ) ; final String [ ] vals = e . getValue ( ) ; if ( vals == null ) { urlString . append ( first ? "?" : "&" ) ; first = false ; urlString . append ( URLEncoder . encode ( name , RemoteRepository . UTF8 ) ) ; } else { for ( String val : vals ) { urlString . append ( first ? "?" : "&" ) ; first = false ; urlString . append ( URLEncoder . encode ( name , RemoteRepository . UTF8 ) ) ; urlString . append ( "=" ) ; if ( val != null ) urlString . append ( URLEncoder . encode ( val , RemoteRepository . UTF8 ) ) ; } } } }
add any url query parameters ( for a get request ) .
