MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / getUrlWithNewRef

Method getUrlWithNewRef

src/main/java/org/htmlunit/util/UrlUtils.java:503–505  ·  view source on GitHub ↗

Creates and returns a new URL identical to the specified URL, except using the specified reference. @param u the URL on which to base the returned URL @param newRef the new reference to use in the returned URL or null to remove it @return a new URL identical to the specified URL, except using the sp

(final URL u, final String newRef)

Source from the content-addressed store, hash-verified

501 * @throws MalformedURLException if there is a problem creating the new URL
502 */
503 public static URL getUrlWithNewRef(final URL u, final String newRef) throws MalformedURLException {
504 return createNewUrl(u.getProtocol(), u.getAuthority(), u.getPath(), newRef, u.getQuery());
505 }
506
507 /**
508 * Creates and returns a new URL identical to the specified URL, except using the specified query string.

Callers 11

targetMethod · 0.95
targetUnknownMethod · 0.95
getUrlWithNewRefMethod · 0.95
getHrefMethod · 0.95
setHrefMethod · 0.95
setHashMethod · 0.95
setHashMethod · 0.95
getTargetUrlMethod · 0.95
getWebRequestMethod · 0.95

Calls 3

createNewUrlMethod · 0.95
getProtocolMethod · 0.45
getPathMethod · 0.45

Tested by 4

targetMethod · 0.76
targetUnknownMethod · 0.76
getUrlWithNewRefMethod · 0.76