public final class UrlUtils extends Object
Modifier and Type | Method and Description |
---|---|
static URL |
getUrlWithNewHost(URL u,
String newHost)
Creates and returns a new URL identical to the specified URL, except using the specified host.
|
static URL |
getUrlWithNewPath(URL u,
String newPath)
Creates and returns a new URL identical to the specified URL, except using the specified path.
|
static URL |
getUrlWithNewPort(URL u,
int newPort)
Creates and returns a new URL identical to the specified URL, except using the specified port.
|
static URL |
getUrlWithNewProtocol(URL u,
String newProtocol)
Creates and returns a new URL identical to the specified URL, except using the specified protocol.
|
static URL |
getUrlWithNewQuery(URL u,
String newQuery)
Creates and returns a new URL identical to the specified URL, except using the specified query string.
|
static URL |
getUrlWithNewRef(URL u,
String newRef)
Creates and returns a new URL identical to the specified URL, except using the specified reference.
|
public static URL getUrlWithNewProtocol(URL u, String newProtocol) throws MalformedURLException
u
- The URL on which to base the returned URL.newProtocol
- The new protocol to use in the returned URL.MalformedURLException
- If there is a problem creating the new URL.public static URL getUrlWithNewHost(URL u, String newHost) throws MalformedURLException
u
- The URL on which to base the returned URL.newHost
- The new host to use in the returned URL.MalformedURLException
- If there is a problem creating the new URL.public static URL getUrlWithNewPort(URL u, int newPort) throws MalformedURLException
u
- The URL on which to base the returned URL.newPort
- The new port to use in the returned URL.MalformedURLException
- If there is a problem creating the new URL.public static URL getUrlWithNewPath(URL u, String newPath) throws MalformedURLException
u
- The URL on which to base the returned URL.newPath
- The new path to use in the returned URL.MalformedURLException
- If there is a problem creating the new URL.public static URL getUrlWithNewRef(URL u, String newRef) throws MalformedURLException
u
- The URL on which to base the returned URL.newRef
- The new reference to use in the returned URL.MalformedURLException
- If there is a problem creating the new URL.public static URL getUrlWithNewQuery(URL u, String newQuery) throws MalformedURLException
u
- The URL on which to base the returned URL.newQuery
- The new query string to use in the returned URL.MalformedURLException
- If there is a problem creating the new URL.Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.