|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zeevbelkin.commons.UrlUtils
public class UrlUtils
| Constructor Summary | |
|---|---|
UrlUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
addParamtsToUrl(java.lang.String u,
java.lang.String params)
This method appends a given URL with name/value parameter pairs. |
static java.lang.String |
getParamFromQuery(java.lang.String params,
java.lang.String name)
retrieves a value of parameter with a given name from an ampersand separated string |
static java.lang.String |
getParamFromUrl(java.lang.String u,
java.lang.String name)
retrieves a parameter with a given name from an URL |
static java.lang.String |
getRootUrl(java.lang.String u)
returns, for any HTTP(s) URL, the URL that points to the site ROOT |
static java.lang.String |
setParamInUrl(java.lang.String u,
java.lang.String name,
java.lang.String value)
This method sets a parameter with a given name in an URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UrlUtils()
| Method Detail |
|---|
public static java.lang.String getRootUrl(java.lang.String u)
u - any HTTP(s) URL
public static java.lang.String addParamtsToUrl(java.lang.String u,
java.lang.String params)
u - the initial URLparams - a string that contains the parameter value pairs in format
name1=value1&name2=value ...
public static java.lang.String setParamInUrl(java.lang.String u,
java.lang.String name,
java.lang.String value)
name - the name of parameter to append or overridevalue - the value of parameter to setu - an initial URL
public static java.lang.String getParamFromUrl(java.lang.String u,
java.lang.String name)
u - given URLname - the parameter name
public static java.lang.String getParamFromQuery(java.lang.String params,
java.lang.String name)
params - ampersand separated stringname - a parameter name to get the value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||