|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.net.UriSupport
@Beta public final class UriSupport
Helper methods for building URIs and parsing some HTTP URL information.
| Constructor Summary | |
|---|---|
private |
UriSupport()
Constructor. |
| Method Summary | |
|---|---|
static String |
buildQuery(List<Pair<String,String>> parameters)
Builds an RFC-3968 encoded URL query component from a collection of parameters. |
static String |
getRawQueryStringParameter(String queryString,
String paramName)
Get the first raw (i.e.RFC-3968 encoded) query string component with the specified parameter name. |
static List<Pair<String,String>> |
parseQueryString(String queryString)
Parses a RFC-3968 encoded query string in to a set of name/value pairs. |
static URI |
setFragment(URI prototype,
String fragment)
Sets the fragment of a URI. |
static URI |
setHost(URI prototype,
String host)
Sets the host of a URI. |
static URI |
setPath(URI prototype,
String path)
Sets the path of a URI. |
static URI |
setPort(URI prototype,
int port)
Sets the port of a URI. |
static URI |
setQuery(URI prototype,
List<Pair<String,String>> parameters)
Sets the query of a URI. |
static URI |
setQuery(URI prototype,
String query)
Sets the query of a URI. |
static URI |
setScheme(URI prototype,
String scheme)
Sets the scheme of a URI. |
static String |
trimOrNullFragment(String fragment)
Trims an RFC-3968 encoded URL fragment component. |
static String |
trimOrNullPath(String path)
Trims an RFC-3968 encoded URL path component. |
static String |
trimOrNullQuery(String query)
Trims an RFC-3968 encoded URL query component. |
static String |
urlDecode(String value)
URL Decode the given string. |
static String |
urlEncode(String value)
URL Encode the given string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private UriSupport()
| Method Detail |
|---|
public static URI setFragment(URI prototype,
String fragment)
prototype - prototype URI that provides information other than the fragmentfragment - fragment for the new URI
public static URI setHost(URI prototype,
String host)
prototype - prototype URI that provides information other than the hosthost - host for the new URI
public static URI setPath(URI prototype,
String path)
prototype - prototype URI that provides information other than the pathpath - path for the new URI
public static URI setPort(URI prototype,
int port)
prototype - prototype URI that provides information other than the portport - port for the new URI
public static URI setQuery(URI prototype,
String query)
prototype - prototype URI that provides information other than the queryquery - query for the new URI
public static URI setQuery(URI prototype,
List<Pair<String,String>> parameters)
prototype - prototype URI that provides information other than the queryparameters - query parameters for the new URI
public static URI setScheme(URI prototype,
String scheme)
prototype - prototype URI that provides information other than the schemescheme - scheme for the new URI
public static String buildQuery(List<Pair<String,String>> parameters)
parameters - collection of parameters from which to build the URL query component, may be null or empty
public static String getRawQueryStringParameter(String queryString,
String paramName)
queryString - the URL encoded HTTP URL query stringparamName - the URL decoded name of the parameter to find
public static List<Pair<String,String>> parseQueryString(String queryString)
null.
queryString - URL encoded query string
public static String trimOrNullPath(String path)
path - path to trim
public static String trimOrNullQuery(String query)
query - query to trim
public static String trimOrNullFragment(String fragment)
fragment - fragment to trim
public static String urlDecode(String value)
value - the string to decode
public static String urlEncode(String value)
value - the string to encode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||