|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.util.UriComponents
public final 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
Method Summary | |
---|---|
UriComponents |
encode()
Encodes all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
UriComponents |
encode(java.lang.String encoding)
Encodes all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
boolean |
equals(java.lang.Object o)
|
UriComponents |
expand(java.util.Map<java.lang.String,?> uriVariables)
Replaces all URI template variables with the values from a given map. |
UriComponents |
expand(java.lang.Object... uriVariableValues)
Replaces all URI template variables with the values from a given array. |
java.lang.String |
getFragment()
Returns the fragment. |
java.lang.String |
getHost()
Returns the host. |
java.lang.String |
getPath()
Returns the path. |
java.util.List<java.lang.String> |
getPathSegments()
Returns the list of path segments. |
int |
getPort()
Returns the port. |
java.lang.String |
getQuery()
Returns the query. |
MultiValueMap<java.lang.String,java.lang.String> |
getQueryParams()
Returns the map of query parameters. |
java.lang.String |
getScheme()
Returns the scheme. |
java.lang.String |
getUserInfo()
Returns the user info. |
int |
hashCode()
|
UriComponents |
normalize()
Normalize the path removing sequences like "path/..". |
java.lang.String |
toString()
|
java.net.URI |
toUri()
Returns a URI from this UriComponents instance. |
java.lang.String |
toUriString()
Returns a URI string from this UriComponents instance. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.String getScheme()
null
.public java.lang.String getUserInfo()
null
.public java.lang.String getHost()
null
.public int getPort()
-1
if no port has been set.
public java.lang.String getPath()
null
.public java.util.List<java.lang.String> getPathSegments()
public java.lang.String getQuery()
null
.public MultiValueMap<java.lang.String,java.lang.String> getQueryParams()
public java.lang.String getFragment()
null
.public UriComponents encode()
UriComponents
instance. This method uses UTF-8 to encode.
public 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 UriComponents expand(java.util.Map<java.lang.String,?> uriVariables)
uriVariables
- the map of URI variables
public UriComponents expand(java.lang.Object... uriVariableValues)
uriVariableValues
- URI variable values
public UriComponents normalize()
StringUtils.cleanPath(String)
public java.lang.String toUriString()
UriComponents
instance.
public java.net.URI toUri()
URI
from this UriComponents
instance.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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 |