public class ApexURLHelper extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ApexURLHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equalsUrl(URL left,
URL right)
URL.equals can be slow and not return the expected result as it will relies on the resolution on the host given
current JVM network configuration.
|
static Optional<ApexHostDescriptor> |
getHost(String string) |
static Optional<ApexHostDescriptor> |
getHost(URL url) |
static String |
resolve(String baseUrl,
String relUrl)
Create a new absolute URL, from a provided existing absolute URL and a relative URL component.
|
static URL |
resolve(URL base,
String relUrl)
Create a new absolute URL, from a provided existing absolute URL and a relative URL component.
|
static URL |
toHttpURL(String asString) |
public static boolean equalsUrl(URL left, URL right)
left - right - public static URL toHttpURL(String asString)
asString - public static Optional<ApexHostDescriptor> getHost(URL url)
public static Optional<ApexHostDescriptor> getHost(String string)
public static String resolve(String baseUrl, String relUrl)
baseUrl - the existing absolute base URLrelUrl - the relative URL to resolve. (If it's already absolute, it will be returned)public static URL resolve(URL base, String relUrl) throws MalformedURLException
base - the existing absolute base URLrelUrl - the relative URL to resolve. (If it's already absolute, it will be returned)MalformedURLException - if an error occurred generating the URLCopyright © 2014–2017 Pivotal Software, Inc.. All rights reserved.