List of utility methods to do URI Create
URI | uri(String uri) uri return URI.create(uri);
|
URI | uri(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); |
URI | uri(String value) uri try { return new URI(value); } catch (URISyntaxException e) { e.printStackTrace(); throw new IllegalArgumentException("Invalid URI: " + value); |
URI | uri(String value) Converts a string to a URI, null safe. return (value != null && value.length() > 0) ? URI.create(value) : null;
|
TemplateModel | uri(URI uri) uri if (uri == null) { return TemplateScalarModel.EMPTY_STRING; return new SimpleScalar(uri.toASCIIString()); |