public class Urls extends Object
| Constructor and Description |
|---|
Urls() |
| Modifier and Type | Method and Description |
|---|---|
static String |
concatUrl(String prefix,
String suffix) |
static boolean |
containsUserInfo(String url)
Does the provided URL contain UserInfo
|
static String |
decode(String str) |
static int |
dotOccurrences(String domain) |
static String |
encode(String str) |
static String |
ensureLeadingSlash(String s) |
static String |
getDomainName(String url,
String domainSuffix)
Compute the domain name from an URL.
|
static boolean |
isIp(String domain) |
static String |
stripLeadingSlash(String s) |
static String |
trimLeadingAndTrailingSlash(String s) |
static String |
trimLeadingAndTrailingSlashJoin(String... parts) |
public static boolean isIp(String domain)
public static int dotOccurrences(String domain)
public static boolean containsUserInfo(String url) throws MalformedURLException
url - MalformedURLExceptionpublic static String getDomainName(String url, String domainSuffix) throws MalformedURLException
url - a given URLdomainSuffix - a domain suffix (can be null)MalformedURLException - exception on a bad urlCopyright © 2022 The Apache Software Foundation. All rights reserved.