Package org.zkoss.util
Class URLs
- java.lang.Object
-
- org.zkoss.util.URLs
-
public class URLs extends java.lang.ObjectUtility class for URL operations.- Since:
- 10.0.1
- Author:
- jumperchen
-
-
Constructor Summary
Constructors Constructor Description URLs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.net.URLsanitizeURL(java.net.URL url)Sanitizes a URL to prevent MalformedURLException and SSRF warning.
-
-
-
Method Detail
-
sanitizeURL
public static java.net.URL sanitizeURL(java.net.URL url) throws java.net.MalformedURLException, java.net.URISyntaxExceptionSanitizes a URL to prevent MalformedURLException and SSRF warning.- Parameters:
url- The URL to be sanitized.- Returns:
- The sanitized URL.
- Throws:
java.net.MalformedURLException- If the URL is not in the correct format.java.net.URISyntaxException- If the URL is not formatted strictly according to RFC2396 and cannot be converted to a URI.
-
-