public static UriBuilder fromUri(Uri uri) throws IllegalArgumentException {
        if (uri == null)
            throw new IllegalArgumentException("Uri cannot be null");

        UriBuilder b = newInstance();
        b.uri(uri);
        return b;
    }
public static UriBuilder fromUri ( Uri uri ) throws IllegalArgumentException { if ( uri == null ) throw new IllegalArgumentException ( "Uri cannot be null" ) ; UriBuilder b = newInstance ( ) ; b . uri ( uri ) ; return b ; }
Create a new instance initialized from an existing URI.

@param uri a URI that will be used to initialize the UriBuilder.

@return a new UriBuilder

@throws IllegalArgumentException if uri is null