java.lang.Object
de.powerstat.validation.ValidationUtils
General validation utilities.
- Author:
- Kai Hofmann
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringsanitizeUrlPath(String urlPath) Sanitize url path.splitHostnamePort(String hostnamePort) Split hostname and port.
-
Field Details
-
URI_SEPARATOR
private static final char URI_SEPARATORURI separator.- See Also:
-
-
Constructor Details
-
ValidationUtils
private ValidationUtils()Private default constructor.
-
-
Method Details
-
sanitizeUrlPath
Sanitize url path.- Parameters:
urlPath- URL path- Returns:
- Sanitized url path
- Throws:
NullPointerException- when urlPath is null
-
splitHostnamePort
Split hostname and port.- Parameters:
hostnamePort- "hostname:port", "ipv4:port", "[ipv6]:port"- Returns:
- String List 0: hostname; 1: port
- Throws:
NullPointerException- If hostnamePort is nullIllegalArgumentException- If it is not a host:port combination
-