public static InetAddress createInetAddressFromURL(URL pURL) {
        try {
            return InetAddress.getByName(pURL.getHost());
        }
        catch (UnknownHostException e) {
            return null;
        }
    }
public static InetAddress createInetAddressFromURL ( URL pURL ) { try { return InetAddress . getByName ( pURL . getHost ( ) ) ; } catch ( UnknownHostException e ) { return null ; } }
Creates the InetAddress object from the given URL.
Equivalent to calling {@code InetAddress.getByName(URL.getHost())}
except that it returns null, instead of throwing UnknownHostException.

@param pURL the URL to look up.
@return the createad InetAddress, or null if the host was unknown.
@see java.net.InetAddress
@see java.net.URL