Class Uri
- Direct Known Subclasses:
- JavaUri
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final UriCreates a default Uri to be modified using the modification methods.static final Uri.ParsingModestatic final Uri.ParsingMode
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract UriaddPathSegment(String segment) Returns a copy of this instance with a path segment added at the end.abstract UriasScala()Returns the Scala DSL representation of this Uri.static UriReturns a Uri created by parsing the given string representation.static Uricreate(String uri, Charset charset, Uri.ParsingMode parsingMode) Returns a Uri created by parsing the given string representation with the provided charset and parsing mode.static Uricreate(String uri, Uri.ParsingMode parsingMode) Returns a Uri created by parsing the given string representation with the provided parsing mode.static UriReturns the Java DSL representation of a Scala DSL Uri.fragment()Returns the fragment part of this Uri.abstract UriReturns a copy of this instance with a new fragment.abstract UriReturns a copy of this instance with a new optional fragment.abstract HostgetHost()Returns the host of this instanceabstract StringReturns the path of this instanceabstract intgetPort()Returns the port of this instanceabstract StringReturns the scheme of this instanceabstract StringReturns the user info of this instanceabstract Hosthost()Returns the Host of this Uri.abstract UriReturns a copy of this instance with a new host.abstract UriReturns a copy of this instance with a new Host.abstract booleanReturns if this is an absolute Uri.abstract booleanisEmpty()Returns if this is an empty Uri.abstract booleanReturns if this is a relative Uri.abstract Stringpath()Returns a String representation of the path of this Uri.abstract UriReturns a copy of this instance with a new path.Returns the path segments of this Uri as an Iterable.abstract intport()Returns the port of this Uri.abstract Uriport(int port) Returns a copy of this instance with a new port.abstract Queryquery()Returns the parsed Query instance of this Uri.abstract Queryquery(Charset charset, Uri.ParsingMode mode) Returns the parsed Query instance of this Uri using the given charset and parsing mode.abstract UriReturns a copy of this instance with a new query.queryString(Charset charset) Returns a decoded String representation of the query of this Uri.Returns an undecoded String representation of the query of this Uri.abstract UrirawQueryString(String rawQuery) Returns a copy of this instance with a new query.abstract UrirawQueryString(String rawQuery, boolean strict) Returns a copy of this instance with a new query.abstract Stringscheme()Returns the scheme of this Uri.abstract UriReturns a copy of this instance with a new scheme.abstract UriReturns a copy of this instance that is relative.abstract StringuserInfo()Returns the user-info of this Uri.abstract UriReturns a copy of this instance with new user-info.
- 
Field Details- 
STRICT
- 
RELAXED
- 
EMPTYCreates a default Uri to be modified using the modification methods.
 
- 
- 
Constructor Details- 
Uripublic Uri()
 
- 
- 
Method Details- 
isAbsolutepublic abstract boolean isAbsolute()Returns if this is an absolute Uri.
- 
isRelativepublic abstract boolean isRelative()Returns if this is a relative Uri.
- 
isEmptypublic abstract boolean isEmpty()Returns if this is an empty Uri.
- 
schemeReturns the scheme of this Uri.
- 
hostReturns the Host of this Uri.
- 
portpublic abstract int port()Returns the port of this Uri.
- 
userInfoReturns the user-info of this Uri.
- 
pathReturns a String representation of the path of this Uri.
- 
pathSegmentsReturns the path segments of this Uri as an Iterable.
- 
queryStringReturns a decoded String representation of the query of this Uri.
- 
rawQueryStringReturns an undecoded String representation of the query of this Uri.
- 
queryReturns the parsed Query instance of this Uri.
- 
queryReturns the parsed Query instance of this Uri using the given charset and parsing mode.
- 
fragmentReturns the fragment part of this Uri.
- 
schemeReturns a copy of this instance with a new scheme.
- 
hostReturns a copy of this instance with a new Host.
- 
hostReturns a copy of this instance with a new host.
- 
portReturns a copy of this instance with a new port.
- 
userInfoReturns a copy of this instance with new user-info.
- 
pathReturns a copy of this instance with a new path.
- 
addPathSegmentReturns a copy of this instance with a path segment added at the end.
- 
rawQueryStringReturns a copy of this instance with a new query.Characters that are not within the range described at https://tools.ietf.org/html/rfc3986#section-3.4 should be percent-encoded. Characters that are in that range may or may not be percent-encoded, and depending on how the query string is parsed this might be relevant: for example, when interpreting the query string as 'key=value' pairs you could use the percent-encoded '=' ('%22) to include a '=' in the key or value. When characters are encountered that are outside of the RFC3986 range they are automatically percent-encoded, but be aware that relying on this is usually a programming error. 
- 
rawQueryStringReturns a copy of this instance with a new query.Characters that are not within the range described at https://tools.ietf.org/html/rfc3986#section-3.4 should be percent-encoded. Characters that are in that range may or may not be percent-encoded, and depending on how the query string is parsed this might be relevant: for example, when interpreting the query string as 'key=value' pairs you could use the percent-encoded '=' ('%22) to include a '=' in the key or value. - Parameters:
- strict- depending on the 'strict' flag, characters outside of the range allowed by RFC3986 will either cause a `IllegalUriException` or be automatically percent-encoded. Be aware that relying on automatic percent-encoding is usually a programming error.
 
- 
queryReturns a copy of this instance with a new query.
- 
toRelativeReturns a copy of this instance that is relative.
- 
fragmentReturns a copy of this instance with a new fragment.
- 
fragmentReturns a copy of this instance with a new optional fragment.
- 
getSchemeReturns the scheme of this instance
- 
getHostReturns the host of this instance
- 
getPortpublic abstract int getPort()Returns the port of this instance
- 
getUserInfoReturns the user info of this instance
- 
getPathStringReturns the path of this instance
- 
asScalaReturns the Scala DSL representation of this Uri.
- 
createReturns a Uri created by parsing the given string representation.
- 
createReturns the Java DSL representation of a Scala DSL Uri.
- 
createReturns a Uri created by parsing the given string representation with the provided parsing mode.
- 
createReturns a Uri created by parsing the given string representation with the provided charset and parsing mode.
 
-