|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.util.UriComponents
public abstract class UriComponents
Represents an immutable collection of URI components, mapping component type to
String values. Contains convenience getters for all components. Effectively similar
to URI
, but with more powerful encoding options and support for
URI template variables.
UriComponentsBuilder
,
Serialized FormNested Class Summary | |
---|---|
static interface |
UriComponents.UriTemplateVariables
Defines the contract for URI Template variables |
Constructor Summary | |
---|---|
protected |
UriComponents(java.lang.String scheme,
java.lang.String fragment)
|
Method Summary | |
---|---|
UriComponents |
encode()
Encode all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
abstract UriComponents |
encode(java.lang.String encoding)
Encode all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
UriComponents |
expand(java.util.Map<java.lang.String,?> uriVariables)
Replace all URI template variables with the values from a given map. |
UriComponents |
expand(java.lang.Object... uriVariableValues)
Replace all URI template variables with the values from a given array. |
UriComponents |
expand(UriComponents.UriTemplateVariables uriVariables)
Replace all URI template variables with the values from the given UriComponents.UriTemplateVariables . |
java.lang.String |
getFragment()
Returns the fragment. |
abstract java.lang.String |
getHost()
Returns the host. |
abstract java.lang.String |
getPath()
Returns the path. |
abstract java.util.List<java.lang.String> |
getPathSegments()
Returns the list of path segments. |
abstract int |
getPort()
Returns the port. |
abstract java.lang.String |
getQuery()
Returns the query. |
abstract MultiValueMap<java.lang.String,java.lang.String> |
getQueryParams()
Returns the map of query parameters. |
java.lang.String |
getScheme()
Returns the scheme. |
abstract java.lang.String |
getSchemeSpecificPart()
Returns the scheme specific part. |
abstract java.lang.String |
getUserInfo()
Returns the user info. |
abstract UriComponents |
normalize()
Normalize the path removing sequences like "path/..". |
java.lang.String |
toString()
|
abstract java.net.URI |
toUri()
Return a URI from this UriComponents instance. |
abstract java.lang.String |
toUriString()
Return a URI string from this UriComponents instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected UriComponents(java.lang.String scheme, java.lang.String fragment)
Method Detail |
---|
public final java.lang.String getScheme()
null
.
public abstract java.lang.String getSchemeSpecificPart()
null
.
public abstract java.lang.String getUserInfo()
null
.
public abstract java.lang.String getHost()
null
.
public abstract int getPort()
-1
if no port has been set.
public abstract java.lang.String getPath()
null
.
public abstract java.util.List<java.lang.String> getPathSegments()
public abstract java.lang.String getQuery()
null
.
public abstract MultiValueMap<java.lang.String,java.lang.String> getQueryParams()
public final java.lang.String getFragment()
null
.
public final UriComponents encode()
UriComponents
instance. This method uses UTF-8 to encode.
public abstract UriComponents encode(java.lang.String encoding) throws java.io.UnsupportedEncodingException
UriComponents
instance.
encoding
- the encoding of the values contained in this map
java.io.UnsupportedEncodingException
- if the given encoding is not supportedpublic final UriComponents expand(java.util.Map<java.lang.String,?> uriVariables)
The given map keys represent variable names; the corresponding values represent variable values. The order of variables is not significant.
uriVariables
- the map of URI variables
public final UriComponents expand(java.lang.Object... uriVariableValues)
The given array represents variable values. The order of variables is significant.
uriVariableValues
- the URI variable values
public final UriComponents expand(UriComponents.UriTemplateVariables uriVariables)
UriComponents.UriTemplateVariables
.
uriVariables
- the URI template values
public abstract UriComponents normalize()
StringUtils.cleanPath(String)
public abstract java.lang.String toUriString()
UriComponents
instance.
public abstract java.net.URI toUri()
URI
from this UriComponents
instance.
public final java.lang.String toString()
toString
in class java.lang.Object
|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |