Here you can find the source of parseURI(final String value)
Parameter | Description |
---|---|
value | String to parse with URI#URI(String) |
public static URI parseURI(final String value)
//package com.java2s; //License from project: Apache License import java.net.URI; import java.net.URISyntaxException; public class Main { /**// w w w. j ava2s .com * Parses the given {@link String} into {@link URI} without throwing any * exception. In case of error null will be returned. * * @param value * {@link String} to parse with {@link URI#URI(String)} * @return New {@link URI} instance; null if the parameter is not a valid * {@link URI} */ public static URI parseURI(final String value) { try { return new URI(value); } catch (URISyntaxException e) { // Silently fail } return null; } }