List of utility methods to do URI Create
void | addParameter(String name, String value, StringBuilder uri) add Parameter if (uri.length() > 0) uri.append('&'); uri.append(encode(name)); if (value != null) { uri.append('='); uri.append(encode(value)); |
void | addParameters(Map Add parameters to the uri .
if (parameters == null || parameters.isEmpty()) return; for (Entry<String, String> param : parameters.entrySet()) addParameter(param.getKey(), param.getValue(), uri); |
void | addParams(final Map add Params if (params == null || params.isEmpty()) return; for (Map.Entry<String, String> param : params.entrySet()) addParam(param.getKey(), param.getValue(), uri); |
URI | addParams(URI uri, Map Add the given params to the query if (params == null || params.size() == 0) { return uri; final String origTxt = uri.toString(); int queryStart = origTxt.indexOf('?'); final StringBuilder result = new StringBuilder(); if (queryStart < 0) { int fragmentStart = origTxt.indexOf('#'); ... |
URI | addQueryParametersToUri(URI uri, Map add Query Parameters To Uri StringBuilder urlParametersBuilder = new StringBuilder(); if (uri == null) { throw new IllegalArgumentException("Define URL before URL parameters"); urlParametersBuilder.append(uri.toString()); String concatenator = FIRST_PARAMETER_CONCATENATOR; for (String paramName : parameters.keySet()) { validateParameters(paramName); ... |
String | addQueryParamsToUri(String uri, Map add Query Params To Uri if (queryParams.size() == 0) { return uri; StringBuilder query = new StringBuilder(); for (Map.Entry<String, String> params : queryParams.entrySet()) { try { if (query.length() > 0) { query.append("&"); ... |
URI | addQueryString(final URI uri, final String queryString) add Query String if (queryString == null) { return uri; if (uri == null) { return null; return uri.resolve(uri.toString() + queryString); |
URI | convertToURI(String uriOrPath) Converts a string representing a file or uri to a uri object. if (uriOrPath.contains("://")) { return URI.create(uriOrPath); } else { return new File(uriOrPath).toURI(); |
URI | convertToURI(String uriString, Map Replace an alias in a URI, if one is recognized. try { URI uri = new URI(uriString); if (uri.isOpaque()) { URI mapping = aliasMap.get(uri.getScheme()); if (mapping != null) { uri = new URI(mapping.toString() + uri.getSchemeSpecificPart() + (uri.getFragment() != null ? "#" + uri.getFragment() : "")); return uri; } catch (URISyntaxException e) { throw new RuntimeException("Bad URI syntax in resource", e); |
URI | convertToURI(String value) convert To URI try { return value == null ? null : new URI(value); } catch (URISyntaxException exc) { return null; |