Java URI Value Check isValidUri(String uriCandidate)

Here you can find the source of isValidUri(String uriCandidate)

Description

is Valid Uri

License

Apache License

Declaration

public static boolean isValidUri(String uriCandidate) 

Method Source Code


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

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

public class Main {
    public static boolean isValidUri(String uriCandidate) {
        try {/*w w w .  j  a v a2s. c o  m*/
            new URI(uriCandidate);
        } catch (URISyntaxException e) {
            return false;
        }

        return true;
    }
}

Related

  1. isValid(String uri)
  2. isValid(URI uri)
  3. isValidURI(final String namespace)
  4. isValidURI(String uri)
  5. isValidUri(String uri, StringBuilder errMsg)
  6. isValidURI(String uriRef)
  7. isValidURIorEmpty(String uri)
  8. isValidURIReference(String uriRef)
  9. isVirtual(URI locationURI)