List of utility methods to do URI Value Check
boolean | isFile(final URI uri) Is the URI representing a file?? if ((uri != null) && (uri.getScheme() != null)) { return uri.getScheme().equalsIgnoreCase("file"); return false; |
boolean | isFile(URI uri) is File return "file".equals(uri.getScheme()) || !uri.isAbsolute(); |
boolean | isFile(URI uri) If there is a file at the other end of this URI return true. if (uri.getScheme().equals(PROTOCOL_FILE)) { return new File(uri.getPath()).isFile(); try { uri.toURL().openStream().close(); return true; } catch (IOException ex) { return false; ... |
boolean | isFileSystemAvailable(File file, URI topLevelResource) Determines via best effort if the file system on which the file resides is available. File topLevel = new File(topLevelResource); if (isEqualPath(file, topLevel)) { return file.exists(); return isFileSystemAvailable(file, topLevel); |
boolean | isFileUri(String uri) is File Uri String scheme = (new URI(uri)).getScheme(); if (scheme != null) return scheme.toLowerCase().equals(FILE); return false; |
boolean | isFileURI(URI uri) Returns whether the given URI refers to a local file system URI. return SCHEME_FILE.equalsIgnoreCase(uri.getScheme());
|
boolean | isFileURI(URI uri) Returns whether the given uri is a file URI as returned, e.g., by a File.
return null != uri && "file".equals(uri.getScheme()); |
boolean | isFileUri(URI uri) is File Uri if (uri == null) { return false; return "file".equals(uri.getScheme()); |
boolean | isFtp(URI uri) check if URI scheme is ftp if ("ftp".equals(uri.getScheme())) { return true; return false; |
boolean | isHostDnsName(URI uri) Returns a boolean indicating whether the host of the specified URI is DNS. String host = uri.getHost(); for (int i = 0; i < host.length(); i++) { char hostChar = host.charAt(i); if (!Character.isDigit(hostChar) && !(hostChar == '.')) { return true; return false; ... |