org.w3c.util
Class URLUtils

java.lang.Object
  extended by org.w3c.util.URLUtils

public class URLUtils
extends java.lang.Object


Constructor Summary
URLUtils()
           
 
Method Summary
static boolean equalsProtocolHostPort(java.net.URL u1, java.net.URL u2)
          Checks that the protocol://host:port part of two URLs are equal.
static java.net.URL normalize(java.net.URL u)
          normalize an URL,
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLUtils

public URLUtils()
Method Detail

equalsProtocolHostPort

public static boolean equalsProtocolHostPort(java.net.URL u1,
                                             java.net.URL u2)
Checks that the protocol://host:port part of two URLs are equal.

Parameters:
u1, - the first URL to check
u2, - the second URL to check
Returns:
a boolean, true if the protocol://host:port part of the URL are equals, false otherwise

normalize

public static java.net.URL normalize(java.net.URL u)
normalize an URL,

Parameters:
u, - the URL to normalize
Returns:
a new URL, the normalized version of the parameter, or the u URL, if something failed in the process