Class URIUtils


  • public class URIUtils
    extends java.lang.Object
    A utility class for URI handling
    Author:
    Keith Visco
    • Constructor Summary

      Constructors 
      Constructor Description
      URIUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String normalize​(java.lang.String absoluteURL)
      This method removes "." or ".." from absolute URL.
      static java.lang.String resolveAsString​(java.lang.String href, java.lang.String documentBase)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • URIUtils

        public URIUtils()
    • Method Detail

      • resolveAsString

        public static java.lang.String resolveAsString​(java.lang.String href,
                                                       java.lang.String documentBase)
      • normalize

        public static java.lang.String normalize​(java.lang.String absoluteURL)
                                          throws java.net.MalformedURLException
        This method removes "." or ".." from absolute URL. I needed this method because the JDK doesn't do this automatically when creating URLs.
        Parameters:
        absoluteURL - the absolute URI to normalize
        Throws:
        java.net.MalformedURLException