public static URI replaceQuery(URI originalURI,Map<String,String> params) throws URISyntaxException {
  String s=createQueryString(params);
  if (s.length() == 0) {
    s=null;
  }
  return replaceQuery(originalURI,s);
}

public static URI replaceQuery ( URI originalURI , Map < String , String > params ) throws URISyntaxException { String s = createQueryString ( params ) ; if ( s . length ( ) == 0 ) { s = null ; } return replaceQuery ( originalURI , s ) ; }
creates a uri from the original uri and the given parameters .
