Java URI Create getURIFromPath(String path)

Here you can find the source of getURIFromPath(String path)

Description

get URI From Path

License

Apache License

Declaration

public static URI getURIFromPath(String path) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

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

public class Main {

    public static URI getURIFromPath(String path) {
        URI retUri = null;//from   w w  w .  j  a va 2  s.  c  om
        try {
            retUri = new URI(path);
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        return retUri;
    }
}

Related

  1. getURIAddress(URI uri)
  2. getUriByEndpoint(String endpoint)
  3. getURIFilename(final String s)
  4. getURIFromEncodedString(String unencoded)
  5. getURIFromPath(String fileOrURI)
  6. getURIName(String forwardSlashPath)
  7. getURIName(URI uri)
  8. getURIParameterValue(URI uri, String name, String defVal)
  9. getURIs(final Object[] objs)