Java URI to Host Name getHostUri()

Here you can find the source of getHostUri()

Description

get Host Uri

License

Open Source License

Declaration

public static URI getHostUri() 

Method Source Code

//package com.java2s;

import java.net.URI;
import java.util.Properties;

public class Main {
    static Properties properties = new Properties();

    public static URI getHostUri() {
        return getProperty("host.uri");
    }// w w w  .  j a  v  a2 s  .  c  o m

    public static URI getProperty(String property) {
        String propertyValue = properties.getProperty(property);
        if (propertyValue == null) {
            return null;
        }
        return URI.create(propertyValue);
    }
}

Related

  1. getHost(URI uri)
  2. getHostAddress(final URI uri)
  3. getHostAddress(final URI uri)
  4. getHostAndPort(URI u)
  5. getHostFromURI(final URI uri)