Java URI Normalize normalize(URI input)

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

Description

normalize

License

Open Source License

Declaration

public static URI normalize(URI input) 

Method Source Code


//package com.java2s;
import java.io.*;
import java.net.*;

public class Main {
    public static URI normalize(URI input) {
        URI uri = null;/*from  w w w .  ja  v  a2 s. com*/
        if (input != null) {
            uri = input.normalize();
            if ("file".equals(uri.getScheme())) {
                try {
                    uri = new File(uri).getCanonicalFile().toURI();
                } catch (IOException e) {
                    uri = new File(uri).toURI();
                }
            }
        }
        return uri;
    }
}

Related

  1. normalize(final String uri)
  2. normalize(String uri, String resourceLocation, String rootLocation)
  3. normalize(URI location)
  4. normalize(URI uri)
  5. normalizedSetCookiePath(final String path, final URI originUri)
  6. normalizedUri(URI uri)