public static String addQueryParameters(String url, String... kvPairs) {
    """
	Appends a list of key/value pairs to the given URL, e.g.:
	
	<pre>
	String url = OAuth.addQueryParameters(&quot;http://example.com?a=1&quot;, b, 2, c, 3);
	</pre>
	
	which yields:
	
	<pre>
	http://example.com?a=1&b=2&c=3
	</pre>
	
	All parameters will be encoded according to OAuth's percent encoding
	rules.
	
	@param url
	the URL
	@param kvPairs
	the list of key/value pairs
	@return
    """
        String queryDelim = url.contains("?") ? "&" : "?";
        StringBuilder sb = new StringBuilder(url + queryDelim);
        for (int i = 0; i < kvPairs.length; i += 2) {
            if (i > 0) {
                sb.append("&");
            }
            sb.append(OAuth.percentEncode(kvPairs[i]) + "="
                    + OAuth.percentEncode(kvPairs[i + 1]));
        }
        return sb.toString();
    }
public static String addQueryParameters(String url, String... kvPairs) {
        String queryDelim = url.contains("?") ? "&" : "?";
        StringBuilder sb = new StringBuilder(url + queryDelim);
        for (int i = 0; i < kvPairs.length; i += 2) {
            if (i > 0) {
                sb.append("&");
            }
            sb.append(OAuth.percentEncode(kvPairs[i]) + "="
                    + OAuth.percentEncode(kvPairs[i + 1]));
        }
        return sb.toString();
    }
public static String addQueryParameters ( String url , String ... kvPairs ) { String queryDelim = url . contains ( "?" ) ? "&" : "?" ; StringBuilder sb = new StringBuilder ( url + queryDelim ) ; for ( int i = 0 ; i < kvPairs . length ; i += 2 ) { if ( i > 0 ) { sb . append ( "&" ) ; } sb . append ( OAuth . percentEncode ( kvPairs [ i ] ) + "=" + OAuth . percentEncode ( kvPairs [ i + 1 ] ) ) ; } return sb . toString ( ) ; }
Appends a list of key/value pairs to the given URL, e.g.:

<pre>
String url = OAuth.addQueryParameters(&quot;http://example.com?a=1&quot;, b, 2, c, 3);
</pre>

which yields:

<pre>
http://example.com?a=1&b=2&c=3
</pre>

All parameters will be encoded according to OAuth's percent encoding
rules.

@param url
the URL
@param kvPairs
the list of key/value pairs
@return
Appends a list of key / value pairs to the given URL e . g . :