public static URI appendQuery(final URI uri,final Form query){
  Reject.ifNull(uri);
  if (query == null || query.isEmpty()) {
    return uri;
  }
  if (uri.getRawQuery() != null) {
    query.fromQueryString(uri.getRawQuery());
  }
  try {
    return create(uri.getScheme(),uri.getRawUserInfo(),uri.getHost(),uri.getPort(),uri.getRawPath(),query.toQueryString(),uri.getRawFragment());
  }
 catch (  final URISyntaxException e) {
    throw new IllegalStateException(e);
  }
}

public static URI appendQuery ( final URI uri , final Form query ) { Reject . ifNull ( uri ) ; if ( query == null || query . isEmpty ( ) ) { return uri ; } if ( uri . getRawQuery ( ) != null ) { query . fromQueryString ( uri . getRawQuery ( ) ) ; } try { return create ( uri . getScheme ( ) , uri . getRawUserInfo ( ) , uri . getHost ( ) , uri . getPort ( ) , uri . getRawPath ( ) , query . toQueryString ( ) , uri . getRawFragment ( ) ) ; } catch ( final URISyntaxException e ) { throw new IllegalStateException ( e ) ; } }
returns a new uri with the given query parameters appended to the original ones , if any . the scheme , authority , path , and fragment remain unchanged .
