Java URI Normalize normalize(URI uri)

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

Description

normalize

License

Open Source License

Declaration

private static URI normalize(URI uri) throws URISyntaxException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    private static URI normalize(URI uri) throws URISyntaxException {
        String path = uri.toString();
        //the following prevents 'URI is not hierarchical' exception thrown by File(URI)
        if (path.startsWith("jar:")) {
            path = path.substring("jar:".length());
            uri = new URI(path);
        }//from  www .  j av  a  2 s  .  c  o  m
        return uri;
    }
}

Related

  1. normalize(final String uri)
  2. normalize(String uri, String resourceLocation, String rootLocation)
  3. normalize(URI input)
  4. normalize(URI location)
  5. normalizedSetCookiePath(final String path, final URI originUri)
  6. normalizedUri(URI uri)
  7. normalizeGitRepoLocation(URI location)
  8. normalizeLink(String link, URI parent, boolean removeParams)