public class JavaUri extends Uri implements scala.Product, java.io.Serializable
Uri.ParsingMode| Modifier and Type | Method and Description |
|---|---|
Uri |
addPathSegment(java.lang.String segment)
Returns a copy of this instance with a path segment added at the end.
|
abstract static R |
apply(T1 v1) |
Uri |
asScala()
Returns the Scala DSL representation of this Uri.
|
java.util.Optional<java.lang.String> |
fragment()
Returns the fragment part of this Uri.
|
Uri |
fragment(java.util.Optional<java.lang.String> fragment)
Returns a copy of this instance with a new optional fragment.
|
Uri |
fragment(java.lang.String fragment)
Returns a copy of this instance with a new fragment.
|
Host |
getHost()
Returns the host of this instance
|
java.lang.String |
getPathString()
Returns the path of this instance
|
int |
getPort()
Returns the port of this instance
|
java.lang.String |
getScheme()
Returns the scheme of this instance
|
java.lang.String |
getUserInfo()
Returns the user info of this instance
|
Host |
host()
Returns the Host of this Uri.
|
Uri |
host(Host host)
Returns a copy of this instance with a new Host.
|
Uri |
host(java.lang.String host)
Returns a copy of this instance with a new host.
|
boolean |
isAbsolute()
Returns if this is an absolute Uri.
|
boolean |
isEmpty()
Returns if this is an empty Uri.
|
boolean |
isRelative()
Returns if this is a relative Uri.
|
java.lang.String |
path()
Returns a String representation of the path of this Uri.
|
Uri |
path(java.lang.String path)
Returns a copy of this instance with a new path.
|
java.lang.Iterable<java.lang.String> |
pathSegments()
Returns the path segments of this Uri as an Iterable.
|
int |
port()
Returns the port of this Uri.
|
Uri |
port(int port)
Returns a copy of this instance with a new port.
|
Query |
query()
Returns the parsed Query instance of this Uri.
|
Query |
query(java.nio.charset.Charset charset,
Uri.ParsingMode mode)
Returns the parsed Query instance of this Uri using the given charset and parsing mode.
|
Uri |
query(Query query)
Returns a copy of this instance with a new query.
|
java.util.Optional<java.lang.String> |
queryString(java.nio.charset.Charset charset)
Returns a decoded String representation of the query of this Uri.
|
java.util.Optional<java.lang.String> |
rawQueryString()
Returns an undecoded String representation of the query of this Uri.
|
Uri |
rawQueryString(java.lang.String rawQuery)
Returns a copy of this instance with a new query.
|
Uri |
rawQueryString(java.lang.String rawQuery,
boolean strict)
Returns a copy of this instance with a new query.
|
java.lang.String |
scheme()
Returns the scheme of this Uri.
|
Uri |
scheme(java.lang.String scheme)
Returns a copy of this instance with a new scheme.
|
Uri |
t(scala.Function1<Uri,Uri> f) |
Uri |
toRelative()
Returns a copy of this instance that is relative.
|
java.lang.String |
toString() |
Uri |
uri() |
java.lang.String |
userInfo()
Returns the user-info of this Uri.
|
Uri |
userInfo(java.lang.String userInfo)
Returns a copy of this instance with new user-info.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic JavaUri(Uri uri)
public abstract static R apply(T1 v1)
public Uri uri()
public boolean isRelative()
UriisRelative in class Uripublic boolean isAbsolute()
UriisAbsolute in class Uripublic boolean isEmpty()
Uripublic java.lang.String scheme()
Uripublic int port()
Uripublic java.lang.String userInfo()
Uripublic java.lang.String path()
Uripublic java.lang.String getScheme()
Uripublic int getPort()
Uripublic java.lang.String getUserInfo()
UrigetUserInfo in class Uripublic java.lang.String getPathString()
UrigetPathString in class Uripublic Uri asScala()
Uripublic java.lang.Iterable<java.lang.String> pathSegments()
UripathSegments in class Uripublic java.util.Optional<java.lang.String> rawQueryString()
UrirawQueryString in class Uripublic java.util.Optional<java.lang.String> queryString(java.nio.charset.Charset charset)
UriqueryString in class Uripublic Query query()
Uripublic Query query(java.nio.charset.Charset charset, Uri.ParsingMode mode)
Uripublic java.util.Optional<java.lang.String> fragment()
Uripublic Uri scheme(java.lang.String scheme)
Uripublic Uri host(Host host)
Uripublic Uri host(java.lang.String host)
Uripublic Uri port(int port)
Uripublic Uri userInfo(java.lang.String userInfo)
Uripublic Uri path(java.lang.String path)
Uripublic Uri toRelative()
UritoRelative in class Uripublic Uri rawQueryString(java.lang.String rawQuery)
UriCharacters 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.
rawQueryString in class Uripublic Uri rawQueryString(java.lang.String rawQuery, boolean strict)
UriCharacters 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.
rawQueryString in class Uristrict - 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.public Uri query(Query query)
Uripublic Uri addPathSegment(java.lang.String segment)
UriaddPathSegment in class Uripublic Uri fragment(java.util.Optional<java.lang.String> fragment)
Uripublic Uri fragment(java.lang.String fragment)
Uripublic java.lang.String toString()
toString in class java.lang.Object