MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / rebuildSchemeSpecificPart

Method rebuildSchemeSpecificPart

vm/JavaAPI/src/java/net/URI.java:434–460  ·  view source on GitHub ↗

Utility method to construct the scheme specific part from the uri segments (less scheme and fragment) @return

()

Source from the content-addressed store, hash-verified

432 * @return
433 */
434 protected String rebuildSchemeSpecificPart() {
435 StringBuffer buffer = new StringBuffer();
436 if (opaque == false && (host != null || port != -1)) {
437 buffer.append(AUTHORITY_MARKER);
438 if (userInfo != null) {
439 buffer.append(getRawUserInfo() + USERINFO_SEPARATOR);
440 }
441 if (host != null) {
442 buffer.append(getHost());
443 }
444 if (port != -1) {
445 buffer.append(PORT_SEPARATOR);
446 buffer.append(getPort());
447 }
448 }
449 if (path != null) {
450 buffer.append(getRawPath());
451 }
452 if (query != null) {
453 if (querySeparator == SOCKET_QUERY_SEPARATOR) {
454 buffer.append(querySeparator + getRawQuery().replace(QUERY_SEPARATOR, SOCKET_QUERY_SEPARATOR));
455 } else {
456 buffer.append(QUERY_MARKER + getRawQuery());
457 }
458 }
459 return buffer.toString();
460 }
461
462 /**
463 * A convenience factory method, intended to be used when the URI string is

Callers 1

Calls 8

appendMethod · 0.95
getRawUserInfoMethod · 0.95
getHostMethod · 0.95
getPortMethod · 0.95
getRawPathMethod · 0.95
getRawQueryMethod · 0.95
toStringMethod · 0.95
replaceMethod · 0.65

Tested by

no test coverage detected