Here you can find the source of getHostFromURI(final URI uri)
Parameter | Description |
---|---|
uri | the URI |
null
if not available.
public static String getHostFromURI(final URI uri)
//package com.java2s; //License from project: BSD License import java.net.URI; public class Main { /**/* www.j a va 2 s . c o m*/ * Get the host (if available) from a URI. * * @param uri * the URI * @return {@link String} with the host, or <code>null</code> if not * available. */ public static String getHostFromURI(final URI uri) { return uri.getHost(); } }