Java URL Normalize normalizeUrl(URL url)

Here you can find the source of normalizeUrl(URL url)

Description

normalize Url

License

LGPL

Declaration

public static URL normalizeUrl(URL url) throws IOException 

Method Source Code


//package com.java2s;
/*//from w w w .j  a  v  a2  s .  c  o m
 * This file is part of VirtualFile.
 *
 * Copyright 2016 by Bernd Riedl <bernd.riedl@gmail.com>
 *
 * Licensed under GNU Lesser General Public License 3.0 or later.
 * Some rights reserved. See COPYING, AUTHORS.
 */

import java.io.IOException;
import java.net.URI;
import java.net.URL;

public class Main {
    public static URL normalizeUrl(URL url) throws IOException {
        URI uri = URI.create(url.toString());
        return uri.normalize().toURL();
    }
}

Related

  1. normalizeUrl(String url)
  2. normalizeUrl(String url)
  3. normalizeUrl(String url)
  4. normalizeUrl(String url)
  5. normalizeURL(URL codebase)
  6. normalizeUrl(URL url)
  7. normalizeURL(URL url)
  8. normalizeUrl(URL url)
  9. normalizeUrl(URL url)