Package com.helger.commons.url
Class URLValidator
java.lang.Object
com.helger.commons.url.URLValidator
Check if a URL is valid.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetUnifiedURL(String sURL) Get the unified version of a URL.static booleanChecks if a value is a valid URL.
-
Method Details
-
getUnifiedURL
Get the unified version of a URL. It trims leading and trailing spaces and lower-cases the URL.- Parameters:
sURL- The URL to unify. May benull.- Returns:
- The unified URL or
nullif the input address isnull.
-
isValid
Checks if a value is a valid URL.- Parameters:
sURL- The value validation is being performed on. Anullor empty value is considered invalid.- Returns:
trueif URL is valid,falseotherwise.
-