public final class UrlBuilder extends Object
public static String generateUrl(String server, String path, String params, String fragment) throws URISyntaxException
server + path + "?" + params + "#" + fragment
Notes:
server
- (required) the server: i.e. "http://source.pentaho.org/"
path
- (required) the path for that server: i.e. "/viewvc/pentaho-reporting"
params
- (optional) any URL parameters to pass (already encoded): i.e. parameter=a+value+with+spaces&x=yfragment
- (optional) any fragment information to be appended to the URLURISyntaxException
- indicates an error trying to combine the fields