|
|||||||||
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(String encoding)
Encodes all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
boolean |
equals(Object o)
|
UriComponents |
expand(Map<String,?> uriVariables)
Replaces all URI template variables with the values from a given map. |
UriComponents |
expand(Object... uriVariableValues)
Replaces all URI template variables with the values from a given array. |
String |
getFragment()
Returns the fragment. |
String |
getHost()
Returns the host. |
String |
getPath()
Returns the path. |
List<String> |
getPathSegments()
Returns the list of path segments. |
int |
getPort()
Returns the port. |
String |
getQuery()
Returns the query. |
MultiValueMap<String,String> |
getQueryParams()
Returns the map of query parameters. |
String |
getScheme()
Returns the scheme. |
String |
getUserInfo()
Returns the user info. |
int |
hashCode()
|
String |
toString()
|
URI |
toUri()
Returns a URI from this UriComponents instance. |
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 String getScheme()
null
.public String getUserInfo()
null
.public String getHost()
null
.public int getPort()
-1
if no port has been set.
public String getPath()
null
.public List<String> getPathSegments()
public String getQuery()
null
.public MultiValueMap<String,String> getQueryParams()
public String getFragment()
null
.public UriComponents encode()
UriComponents
instance. This method uses UTF-8 to encode.
public UriComponents encode(String encoding) throws UnsupportedEncodingException
UriComponents
instance.
encoding
- the encoding of the values contained in this map
UnsupportedEncodingException
- if the given encoding is not supportedpublic UriComponents expand(Map<String,?> uriVariables)
uriVariables
- the map of URI variables
public UriComponents expand(Object... uriVariableValues)
uriVariableValues
- URI variable values
public String toUriString()
UriComponents
instance.
public URI toUri()
URI
from this UriComponents
instance.
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |