Java URI Create createURI(final String scheme, final String host, final int port)

Here you can find the source of createURI(final String scheme, final String host, final int port)

Description

create URI

License

Apache License

Declaration

public static URI createURI(final String scheme, final String host, final int port) 

Method Source Code


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

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

public class Main {
    public static URI createURI(final String scheme, final String host, final int port) {
        return createURIWithFull(scheme, null, host, port, null, null, null);
    }/*www .  j a  va  2 s . co m*/

    public static URI createURIWithFull(final String scheme, final String userInfo, final String host,
            final int port, final String path, final String query, final String fragment) {
        try {
            return new URI(scheme, userInfo, host, port, path, query, fragment);
        } catch (URISyntaxException e) {
            throw new IllegalStateException("Unable to create URI", e);
        }
    }
}

Related

  1. createURI()
  2. createUri(File file)
  3. createURI(final String file)
  4. createUri(final String path)
  5. createUri(final String path, final String query)
  6. createURI(final String scheme, final String host, int port, final String path, final String query, final String fragment)
  7. createURI(final String scheme, final String[] pathAsArray)
  8. createURI(List proxyPorts)
  9. createUri(String base)