Here you can find the source of uri(String value)
Parameter | Description |
---|---|
value | the string value. |
public static URI uri(String value)
//package com.java2s; import java.net.URI; public class Main { /**//ww w .j a va 2 s. c om * Converts a string to a URI, null safe. * * @param value * the string value. * @return the URI. */ public static URI uri(String value) { return (value != null && value.length() > 0) ? URI.create(value) : null; } }