Java URI to Path getPath(final URI uri)

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

Description

get Path

License

Apache License

Declaration

public static String getPath(final URI uri) 

Method Source Code

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

import java.net.URI;

public class Main {
    public static String getPath(final URI uri) {
        return isFileUri(uri) ? uri.getPath() : uri.toASCIIString();
    }// w w w  . jav  a  2s  .co  m

    public static boolean isFileUri(final URI uri) {
        return "file".equals(uri.getScheme());
    }
}

Related

  1. getPath(final URI uri)
  2. getPath(String uriStr)
  3. getPath(URI addr)
  4. getPath(URI uri)
  5. getPathAndQueryURI(URI requestUri)