Java URI Value Check isResource(URI uri)

Here you can find the source of isResource(URI uri)

Description

is Resource

License

Open Source License

Return

whether this URI represents a resource.

Declaration

public static boolean isResource(URI uri) 

Method Source Code


//package com.java2s;

import java.net.URI;

public class Main {
    /**//from w w w  . j  a  va 2s .c om
     * @return whether this URI represents a resource.
     */
    public static boolean isResource(URI uri) {
        String scheme = uri.getScheme();
        return scheme.equals("resource") || scheme.equals("classpath") || scheme.startsWith("jar");
    }
}

Related

  1. isProjectCacheURI(java.net.URI uri)
  2. isRedirectEndpointUriValid(String redirectUri)
  3. isRedisSSLScheme(URI uri)
  4. isRemoteNamespace(URI ns)
  5. isResolvable(URI toCheck)
  6. isResourceLocalToServer(URI resourceUri, URI serverUri)
  7. isRoot(URI base)
  8. isRoot(URI uri)
  9. isSecure(final URI uri)