public class URLUtils
extends java.lang.Object
This static class provides various utility methods for manipulating URIs/URLs.
Modifier | Constructor and Description |
---|---|
protected |
URLUtils()
Don't allow instantiation but do allow overrides.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getFileNameFromURL(java.net.URL url,
java.lang.String outputDirectoryName)
Get a file name from a URL.
|
static java.net.URL |
getURLFromFileNameOrURL(java.lang.String fileNameOrURL)
Get URL from file name or URL.
|
static boolean |
isURL(java.lang.String possibleURL)
Check if string is a valid URL.
|
public static java.net.URL getURLFromFileNameOrURL(java.lang.String fileNameOrURL)
fileNameOrURL
- The file name or URL string.public static java.lang.String getFileNameFromURL(java.net.URL url, java.lang.String outputDirectoryName)
url
- The URL.outputDirectoryName
- The output directory name.public static boolean isURL(java.lang.String possibleURL)
possibleURL
- String to check for being a URL.