List of utility methods to do URL Build
String | buildQueryString(Multimap Create a query string StringBuilder bld = new StringBuilder(); boolean afterFirst = false; for (Map.Entry<String, String> entry : params.entries()) { if (afterFirst) bld.append("&"); else afterFirst = true; bld.append(urlEncode(entry.getKey())); ... |
String | buildURL(int imageId) build URL StringBuilder builder = new StringBuilder("/"); for (int i = 1; i < 9; i++) { builder.append(imageId % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1)); if ((i % 2) == 0) { builder.append("/"); return STARS_SERVICE_PREFIX ... |
String | buildUrl(String base, String local) build Url int ci = local.indexOf(':'); if (local.startsWith("/") || ci == 1) return "file:///" + local; if (ci > 2 && ci < 6) return local; if (base == null) base = "file:///"; else { ... |
String | buildUrl(String cid, String lid, String sid, String pid, String qid, String imageName) build Url String image_server = "https://www.mousephenotype.org/images/emb/"; String url = image_server + '/' + cid + '/' + lid + '/' + sid + '/' + pid + '/' + qid + '/' + imageName; return url; |
String | buildURL(String host, int port, String base, String ext) build URL StringBuilder sb = new StringBuilder(); sb.append("http://").append(host); sb.append(":").append(port); sb.append(base); sb.append(ext); return sb.toString(); |
String | buildUrl(String host, String target) Build the remote url: http://host:8080/voxworx/target StringBuilder s = new StringBuilder(); s.append("http://"); s.append(host); s.append(":"); s.append(SERVICE_PORT); s.append("/"); s.append(SERVLET_CONTEXT); s.append("/"); ... |
String | buildUrl(String protocol, String host, int port, String context) build Url StringBuilder url = new StringBuilder(); url.append(protocol); url.append("://"); url.append(host); if ("http".equals(protocol) && port == 80) { } else if ("https".equals(protocol) && port == 443) { } else { url.append(':'); ... |
String | buildUrl(String scheme, String base, String path, String query) build Url return scheme + "://" + base + path + query; |
String | buildUrl(String scheme, String host, int port) build Url return scheme + "://" + host + ":" + port; |
String | buildUrl(String uri) Builds a URL from a URI return "http://localhost:9090" + uri; |