org.jboss.test.selenium.utils
Class URLUtils

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

public final class URLUtils
extends Object

Provides URL manipulations and functionality.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
static URL buildUrl(String context, String... relocations)
          Use URL context and one or more relocations to build end URL.
static URL buildUrl(URL context, String... relocations)
          Use URL context and one or more relocations to build end URL.
static String resourceMd5Digest(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
 

Method Detail

buildUrl

public static URL buildUrl(String context,
                           String... relocations)
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:
AssertionError - when context or some of relocations are malformed URLs

buildUrl

public static URL buildUrl(URL context,
                           String... relocations)
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:
AssertionError - when context or some of relocations are malformed URLs

resourceMd5Digest

public static String resourceMd5Digest(String url)
                                throws 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:
IOException - when connection to URL fails


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.