Java URI Create uri(String value)

Here you can find the source of uri(String value)

Description

Converts a string to a URI, null safe.

License

Open Source License

Parameter

Parameter Description
value the string value.

Return

the URI.

Declaration

public static URI uri(String value) 

Method Source Code


//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;
    }
}

Related

  1. uri(String str)
  2. uri(String uri)
  3. uri(String uri)
  4. uri(String uriStr)
  5. uri(String value)
  6. uri(URI uri)