code: public static URL createURLFromInetAddress(InetAddress pIP, String pProtocol) {
          try {
              return new URL(pProtocol, pIP.getHostName(), "");
          }
          catch (MalformedURLException e) {
              return null;
          }
      }
docs: Creates an URL from the given InetAddress object, using the given
  protocol.
  Equivalent to calling
  {@code new URL(protocol, InetAddress.getHostName(), "")}
  except that it returns null, instead of throwing MalformedURLException.
  
  @param pIP       the IP address to look up
  @param pProtocol the protocol to use in the new URL
  @return the created URL or null, if the URL could not be created.
  @see java.net.URL
  @see java.net.InetAddress