()
| 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 |
no test coverage detected