Code example for URI

Methods: getHostgetPathgetPortgetQuerygetSchemegetUserInfo

0
public class UrlBuilder { 
 
	public URI addQueryParameters(Map<String, Object> parameters, URI baseUrl) throws UrlBuilderException
	{ 
		try { 
			String newQuery = addQueryParameters(baseUrl.getQuery(), parameters);
			 
			return new URI(baseUrl.getScheme(), baseUrl.getUserInfo(), baseUrl.getHost(), baseUrl.getPort(), baseUrl.getPath(), newQuery, baseUrl.getFragment());
		} catch (URISyntaxException e) {
			throw new UrlBuilderException(e);
		} 
	}	 
	 
	public String addQueryParameters(String queryParams, Map<String, Object> newParameters) throws UrlBuilderException
	{ 
		try { 
			Map<String, String> params;
			if (queryParams!=null)
			{ 
				params = new LinkedHashMap<String, String>(parseQueryParameters(queryParams));
Contextual code suggestions in your IDE  Get Codota for Java