org.apache.cactus.util
Class UrlUtil

java.lang.Object
  extended byorg.apache.cactus.util.UrlUtil

public class UrlUtil
extends java.lang.Object

Various utility methods for URL manipulation.

Version:
$Id: UrlUtil.java,v 1.5 2003/05/26 11:45:22 cmlenz Exp $
Author:
Vincent Massol

Constructor Summary
UrlUtil()
           
 
Method Summary
static java.lang.String getPath(java.net.URL theURL)
          Returns the path part of the URL.
static java.lang.String getQuery(java.net.URL theURL)
          Returns the query string of the URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlUtil

public UrlUtil()
Method Detail

getPath

public static java.lang.String getPath(java.net.URL theURL)
Returns the path part of the URL. This method is needed for JDK 1.2 support as URL.getPath() does not exist in JDK 1.2 (only for JDK 1.3+).

Parameters:
theURL - the URL from which to extract the path
Returns:
the path part of the URL

getQuery

public static java.lang.String getQuery(java.net.URL theURL)
Returns the query string of the URL. This method is needed for JDK 1.2 support as URL.getQuery() does not exist in JDK 1.2 (only for JDK 1.3+).

Parameters:
theURL - the URL from which to extract the query string
Returns:
the query string portion of the URL


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.