Java URI to Path getPath(URI uri)

Here you can find the source of getPath(URI uri)

Description

get Path

License

Apache License

Declaration

public static String getPath(URI uri) 

Method Source Code

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

import java.net.URI;

public class Main {
    public static String getPath(URI uri) {
        String path = uri.getPath();

        if (path == null) {
            path = uri.getSchemeSpecificPart();
        }/*from   w  ww  .jav a  2  s .  c  o  m*/

        return path;
    }
}

Related

  1. getPath(final URI uri)
  2. getPath(final URI uri)
  3. getPath(String uriStr)
  4. getPath(URI addr)
  5. getPathAndQueryURI(URI requestUri)
  6. getPathAsArray(URI uri)
  7. getPathByTrimmingEndingFileSeparator(URI uri)
  8. getPathComponents(URI uri)