Java Utililty Methods URI Create

List of utility methods to do URI Create

Description

The list of methods to do URI Create are organized into topic(s).

Method

URIuri(String uri)
uri
return URI.create(uri);
URIuri(String uriStr)
Convert an String into a URI.
try {
    return uriStr == null ? null : new URI(uriStr);
} catch (URISyntaxException e) {
    throw new IllegalArgumentException("Unable to convert String into URI: " + uriStr); 
URIuri(String value)
uri
try {
    return new URI(value);
} catch (URISyntaxException e) {
    e.printStackTrace();
    throw new IllegalArgumentException("Invalid URI: " + value);
URIuri(String value)
Converts a string to a URI, null safe.
return (value != null && value.length() > 0) ? URI.create(value) : null;
TemplateModeluri(URI uri)
uri
if (uri == null) {
    return TemplateScalarModel.EMPTY_STRING;
return new SimpleScalar(uri.toASCIIString());