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

Method rebuildSchemeSpecificPart

Ports/CLDC11/src/java/net/URI.java:344–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342 /// Utility method to construct the scheme specific part from the uri
343 /// segments (less scheme and fragment)
344 protected String rebuildSchemeSpecificPart() {
345 StringBuffer buffer = new StringBuffer();
346 if (opaque == false && (host != null || port != -1)) {
347 buffer.append(AUTHORITY_MARKER);
348 if (userInfo != null) {
349 buffer.append(getRawUserInfo() + USERINFO_SEPARATOR);
350 }
351 if (host != null) {
352 buffer.append(getHost());
353 }
354 if (port != -1) {
355 buffer.append(PORT_SEPARATOR);
356 buffer.append(getPort());
357 }
358 }
359 if (path != null) {
360 buffer.append(getRawPath());
361 }
362 if (query != null) {
363 if (querySeparator == SOCKET_QUERY_SEPARATOR) {
364 buffer.append(querySeparator + getRawQuery().replace(QUERY_SEPARATOR, SOCKET_QUERY_SEPARATOR));
365 } else {
366 buffer.append(QUERY_MARKER + getRawQuery());
367 }
368 }
369 return buffer.toString();
370 }
371
372 /// A convenience factory method, intended to be used when the URI string is
373 /// known to be valid (ie. a static application URI), so it is not needed for

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