org.jboss.test.selenium.utils
Class URLUtils

java.lang.Object
  extended by org.jboss.test.selenium.utils.URLUtils

public class URLUtils
extends java.lang.Object

Provides URL manipulations and functionality.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
URLUtils()
           
 
Method Summary
static java.lang.String buildUrl(java.lang.String context, java.lang.String... relocations)
          Use URL context and one or more relocations to build end URL.
static java.lang.String resourceMd5Digest(java.lang.String url)
          Gets a MD5 digest of some resource obtains as input stream from connection to URL given by URL string.
 
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

buildUrl

public static java.lang.String buildUrl(java.lang.String context,
                                        java.lang.String... relocations)
                                 throws java.net.MalformedURLException
Use URL context and one or more relocations to build end URL.

Parameters:
context - first URL used like a context root for all relocation changes
relocations - array of relocation URLs
Returns:
end url after all changes made on context with relocations
Throws:
java.net.MalformedURLException - when context or some of relocations are malformed

resourceMd5Digest

public static java.lang.String resourceMd5Digest(java.lang.String url)
                                          throws java.io.IOException
Gets a MD5 digest of some resource obtains as input stream from connection to URL given by URL string.

Parameters:
url - of the resource
Returns:
MD5 message digest of resource
Throws:
java.io.IOException - when connection to URL fails


Copyright © 2010. All Rights Reserved.