public static String getConcatenatedParameters ( Map < String , String > parameters , String ... keys ) { StringBuilder keyValues = new StringBuilder ( ) ; for ( String key : keys ) { String value = parameters . get ( key . toLowerCase ( ) . trim ( ) ) ; if ( value != null ) { if ( keyValues . length ( ) != 0 ) { keyValues . append ( "&" ) ; } keyValues . append ( key . toUpperCase ( ) ) ; keyValues . append ( "=" ) ; keyValues . append ( value ) ; } } return keyValues . toString ( ) ; }
Create the Query part of an URI