Java URL Normalize normalize(URL url)

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

Description

normalize

License

Open Source License

Declaration

public static URL normalize(URL url) throws MalformedURLException 

Method Source Code

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

import java.net.MalformedURLException;
import java.net.URL;

public class Main {
    public static URL normalize(URL url) throws MalformedURLException {
        String stringUrl = url.toString();
        if (!"/".equals(stringUrl.substring(stringUrl.length() - 1))) {
            stringUrl += "/";
        }//from w  w  w .j a  va2 s. c o m
        return new URL(stringUrl);
    }
}

Related

  1. normalize(String url)
  2. normalize(String url)
  3. normalize(String url_str)
  4. normalize(URL u)
  5. normalize(URL url)
  6. normalizeBaseUrl(String networkUrl)
  7. normalizeCapabilitiesUrl(String url)
  8. normalizePrefix(String url)
  9. normalizeShortUrl(String url)