Java Utililty Methods URI Value Check

List of utility methods to do URI Value Check

Description

The list of methods to do URI Value Check are organized into topic(s).

Method

booleanisIRODSURIScheme(final URI irodsURI)
Test to see if the URI is of the iRODS scheme "irods://".
return SCHEME.equals(irodsURI.getScheme());
booleanisJar(final URI uri)
Is the URI representing a JAR file??
if ((uri != null) && (uri.getScheme() != null)) {
    return uri.getScheme().equalsIgnoreCase("jar");
return false;
booleanisJarFile(final URI uri)
is Jar File
return JAR_FILE_ENDING.equals(uri.getScheme());
booleanisLocal(final URI uri)
Check if the data pointed by given URL is inside or outside current fileSystem.
return "file".equalsIgnoreCase(uri.getScheme());
booleanisLocal(final URI uri)
is Local
try {
    final String hostName = uri.getHost();
    final InetAddress address = InetAddress.getByName(hostName);
    NetworkInterface nic;
    if (address.isLinkLocalAddress()) {
        Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
        nic = null;
        while (interfaces.hasMoreElements() && nic == null) {
...
booleanisLocalFile(URI uri)
Checks if the URI points to the local file.
if (!uri.isAbsolute())
    return false;
if (uri.isOpaque())
    return false;
if (!"file".equalsIgnoreCase(uri.getScheme()))
    return false;
if (uri.getAuthority() != null)
    return false;
...
booleanisLocalFile(URI uri)
Tests to see if a URI represents a local file.
if (uri == null) {
    return false;
String scheme = uri.getScheme();
return scheme != null && FILE_URI_SCHEME.equals(scheme.toLowerCase());
booleanisLocalUri(String uriString)
is Local Uri
URI uri = new URI(uriString);
if (uri.getScheme().equalsIgnoreCase("file")) {
    return true;
return false;
booleanisLocalURI(URI uri)
is Local URI
if (uri == null || uri.isOpaque() || !uri.isAbsolute() || uri.getHost() == null) {
    throw new IllegalArgumentException();
InetAddress host = InetAddress.getByName(uri.getHost());
return host.isLoopbackAddress() || host.isAnyLocalAddress()
        || NetworkInterface.getByInetAddress(host) != null;
BooleanisModuleURI(URI uri)
is Module URI
return MODULE_SCHEME.equalsIgnoreCase(uri.getScheme());