public final class URLUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
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 |
encodeBase64Credentials(String username,
String password)
Encodes credentials using Base64 encoding, which can be used to build a header for HTTP Basic authorization
|
static String |
resourceMd5Digest(String url)
Gets a MD5 digest of some resource obtains as input stream from connection to URL given by URL string.
|
public static URL buildUrl(String context, String... relocations)
context - first URL used like a context root for all relocation changesrelocations - array of relocation URLsAssertionError - when context or some of relocations are malformed URLspublic static URL buildUrl(URL context, String... relocations)
context - first URL used like a context root for all relocation changesrelocations - array of relocation URLsAssertionError - when context or some of relocations are malformed URLspublic static String resourceMd5Digest(String url) throws IOException
url - of the resourceIOException - when connection to URL failspublic static String encodeBase64Credentials(String username, String password)
username - User name to be encodedpassword - Password to be encodedusername:password encoded with Base64Copyright © 2012 JBoss by Red Hat. All Rights Reserved.