List of utility methods to do URL Value Check
boolean | isFile(URL url) is File return (url != null) && ((url.getProtocol().equals("file")) || (url.getProtocol().equals("vfsfile"))); |
boolean | isFile(URL url) is File return url != null && url.getProtocol().equals(URL_PROTOCOL_FILE);
|
boolean | isFileInJar(URL resource) Checks if a URL designates a single file in a Jar or not. return resource.getPath().matches(".*(\\.\\w+)"); |
boolean | isFileResource(URL resource) is File Resource return !resource.toExternalForm().endsWith(SLASH);
|
boolean | isFileSpecified(URL url) Determines whether a file is specified in the path part of the url. boolean specified = false; String path = url.getPath(); int posLastSlash = path.lastIndexOf('/'); int posLastDot = path.lastIndexOf('.'); specified = posLastDot > posLastSlash; return specified; |
boolean | isFileURL(String path) is File URL return isFileURL(getURL(path));
|
boolean | isFileURL(URL repositoryURL) is File URL return "file".equalsIgnoreCase(repositoryURL.getProtocol()); |
boolean | isFileURL(URL url) Returns true if the URL is a file URL return url.getProtocol().equalsIgnoreCase("file"); |
boolean | isFileURL(URL url) is File URL String protocol = url.getProtocol();
return (URL_PROTOCOL_FILE.equals(protocol) || protocol.startsWith(URL_PROTOCOL_VFS));
|
boolean | isFileURL(URL url) Determine whether the given URL points to a resource in the file system, that is, has protocol "file" or "vfs". String protocol = url.getProtocol();
return (URL_PROTOCOL_FILE.equals(protocol) || protocol.startsWith(URL_PROTOCOL_VFS));
|