Here you can find the source of isURI(String uri)
isURI.
Parameter | Description |
---|---|
uri | a java.lang.String object. |
public static boolean isURI(String uri)
//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; } } }