Java URI Create uri(String str)

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

Description

uri

License

Open Source License

Declaration

public static URI uri(String str) 

Method Source Code

//package com.java2s;
/*//from   w  w  w  . jav a 2 s.  c o m
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

import java.net.URI;
import java.net.URISyntaxException;

public class Main {
    public static URI uri(String str) {
        try {
            return new URI(str);
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException(e);
        }
    }
}

Related

  1. getURIWithAuthority(URI uri, String authority)
  2. stringToUri(String fileString)
  3. stringToURI(String[] str)
  4. uri(String host, String prefix, String path)
  5. uri(String path)
  6. uri(String uri)
  7. uri(String uri)
  8. uri(String uriStr)
  9. uri(String value)