com.sun.enterprise.deployment.deploy.shared
Class Util

java.lang.Object
  extended by com.sun.enterprise.deployment.deploy.shared.Util

public class Util
extends Object

Utility logic.


Constructor Summary
Util()
           
 
Method Summary
static String getURIName(URI uri)
          Returns the name portion of the specified URI.
static URI resolve(URI baseUri, String uriString)
          Constructs a new URI by parsing the given string and then resolving it against the base URI.
static URI toURI(URL url)
          Returns URI for the specified URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getURIName

public static String getURIName(URI uri)
Returns the name portion of the specified URI. This is defined as the part of the URI's path after the final slash (if any). If the URI ends with a slash that final slash is ignored in finding the name.

Parameters:
uri - the URI from which to extract the name
Returns:
the name portion of the URI

toURI

public static URI toURI(URL url)
                 throws URISyntaxException
Returns URI for the specified URL. This method will take care of the space in URL.

Parameters:
url - the URL to convert to URI
Returns:
the URI
Throws:
URISyntaxException

resolve

public static URI resolve(URI baseUri,
                          String uriString)
Constructs a new URI by parsing the given string and then resolving it against the base URI. This method will take care of the space in String.

Parameters:
baseUri - the base URI to resolve against
uriString - the String to construct URI and resolve
Returns:
the resulting URI


Copyright © 2012. All Rights Reserved.