Code example for URI

Methods: getFragmentgetHostgetPathgetPortgetSchemegetUserInfo

0
	} 
 
	protected static URI buildUri(URI uri, String additionalPath, 
			String indexName, String login, String apiKey, 
			String additionnalQuery) throws URISyntaxException { 
		StringBuilder path = new StringBuilder(uri.getPath()); 
		if (additionalPath != null) 
			path.append(additionalPath); 
		StringBuilder query = new StringBuilder(); 
		if (indexName != null) { 
			query.append("index="); 
			query.append(indexName); 
		} 
		if (login != null) { 
			query.append("&login="); 
			query.append(login); 
		} 
		if (apiKey != null) { 
			query.append("&key="); 
			query.append(apiKey); 
		} 
		if (additionnalQuery != null) { 
			if (query.length() > 0) 
				query.append("&"); 
			query.append(additionnalQuery); 
		} 
		return new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), 
				uri.getPort(), path.toString(), query.toString(), 
				uri.getFragment()); 
 
	} 
 
	public static String getCallKeyValue(XPathParser xpp, String key) 
			throws SearchLibException { 
Connect your IDE to all the code out there  Get Codota for Java