Java URI from toUri(String ip, String path)

Here you can find the source of toUri(String ip, String path)

Description

to Uri

License

Apache License

Declaration

public static String toUri(String ip, String path) 

Method Source Code


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

import java.net.URL;

public class Main {
    public static String toUri(String ip, String path) {
        try {// w w w .ja v  a 2s  .c  o  m
            URL url = new URL(new URL(ip), path);
            return url.toExternalForm();
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. toURI(final String location)
  2. toURI(final String path)
  3. toURI(final String uriString)
  4. toUri(java.io.File file)
  5. toUri(String endpoint, Protocol protocol)
  6. toURI(String location)
  7. toURI(String location)
  8. toURI(String location)
  9. toURI(String location)