Java URI Value Check isURI(String uri)

Here you can find the source of isURI(String uri)

Description

isURI.

License

Apache License

Parameter

Parameter Description
uri a java.lang.String object.

Return

a boolean.

Declaration

public static boolean isURI(String uri) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.net.URI;
import java.net.URISyntaxException;

public class Main {
    /**/*w  w  w .j  av  a2  s.  co  m*/
     * <p>isURI.</p>
     *
     * @param uri a {@link java.lang.String} object.
     * @return a boolean.
     * @since 0.7.2
     */
    public static boolean isURI(String uri) {
        try {
            new URI(uri);
            return true;
        } catch (URISyntaxException e) {
            return false;
        }
    }
}

Related

  1. isSystemIdentifier(URI localIdentifier)
  2. isType(URI uri, Class clazz)
  3. isType(URI uri, String name)
  4. isURI(Class type)
  5. isURI(String plainString)
  6. isUriValid(String uri)
  7. isUsingNonDefaultPort(URI uri)
  8. isValid(String uri)
  9. isValid(URI uri)