Class JavaUri
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pekko.http.javadsl.model.Uri
Uri.ParsingMode -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPathSegment(String segment) Returns a copy of this instance with a path segment added at the end.abstract static Rapply(T1 v1) asScala()Returns the Scala DSL representation of this Uri.fragment()Returns the fragment part of this Uri.Returns a copy of this instance with a new fragment.Returns a copy of this instance with a new optional fragment.getHost()Returns the host of this instanceReturns the path of this instanceintgetPort()Returns the port of this instanceReturns the scheme of this instanceReturns the user info of this instancehost()Returns the Host of this Uri.Returns a copy of this instance with a new host.Returns a copy of this instance with a new Host.booleanReturns if this is an absolute Uri.booleanisEmpty()Returns if this is an empty Uri.booleanReturns if this is a relative Uri.path()Returns a String representation of the path of this Uri.Returns a copy of this instance with a new path.Returns the path segments of this Uri as an Iterable.intport()Returns the port of this Uri.port(int port) Returns a copy of this instance with a new port.query()Returns the parsed Query instance of this Uri.query(Charset charset, Uri.ParsingMode mode) Returns the parsed Query instance of this Uri using the given charset and parsing mode.Returns 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.rawQueryString(String rawQuery) Returns a copy of this instance with a new query.rawQueryString(String rawQuery, boolean strict) Returns a copy of this instance with a new query.scheme()Returns the scheme of this Uri.Returns a copy of this instance with a new scheme.Returns a copy of this instance that is relative.toString()uri()userInfo()Returns the user-info of this Uri.Returns a copy of this instance with new user-info.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
JavaUri
-
-
Method Details
-
apply
public abstract static R apply(T1 v1) -
uri
-
isRelative
public boolean isRelative()Description copied from class:UriReturns if this is a relative Uri.- Specified by:
isRelativein classUri
-
isAbsolute
public boolean isAbsolute()Description copied from class:UriReturns if this is an absolute Uri.- Specified by:
isAbsolutein classUri
-
isEmpty
public boolean isEmpty()Description copied from class:UriReturns if this is an empty Uri. -
scheme
Description copied from class:UriReturns the scheme of this Uri. -
host
Description copied from class:UriReturns the Host of this Uri. -
port
public int port()Description copied from class:UriReturns the port of this Uri. -
userInfo
Description copied from class:UriReturns the user-info of this Uri. -
path
Description copied from class:UriReturns a String representation of the path of this Uri. -
getScheme
Description copied from class:UriReturns the scheme of this instance -
getHost
Description copied from class:UriReturns the host of this instance -
getPort
public int getPort()Description copied from class:UriReturns the port of this instance -
getUserInfo
Description copied from class:UriReturns the user info of this instance- Specified by:
getUserInfoin classUri
-
getPathString
Description copied from class:UriReturns the path of this instance- Specified by:
getPathStringin classUri
-
asScala
Description copied from class:UriReturns the Scala DSL representation of this Uri. -
pathSegments
Description copied from class:UriReturns the path segments of this Uri as an Iterable.- Specified by:
pathSegmentsin classUri
-
rawQueryString
Description copied from class:UriReturns an undecoded String representation of the query of this Uri.- Specified by:
rawQueryStringin classUri
-
queryString
Description copied from class:UriReturns a decoded String representation of the query of this Uri.- Specified by:
queryStringin classUri
-
query
Description copied from class:UriReturns the parsed Query instance of this Uri. -
query
Description copied from class:UriReturns the parsed Query instance of this Uri using the given charset and parsing mode. -
fragment
Description copied from class:UriReturns the fragment part of this Uri. -
t
-
scheme
Description copied from class:UriReturns a copy of this instance with a new scheme. -
host
Description copied from class:UriReturns a copy of this instance with a new Host. -
host
Description copied from class:UriReturns a copy of this instance with a new host. -
port
Description copied from class:UriReturns a copy of this instance with a new port. -
userInfo
Description copied from class:UriReturns a copy of this instance with new user-info. -
path
Description copied from class:UriReturns a copy of this instance with a new path. -
toRelative
Description copied from class:UriReturns a copy of this instance that is relative.- Specified by:
toRelativein classUri
-
rawQueryString
Description copied from class:UriReturns 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.
- Specified by:
rawQueryStringin classUri
-
rawQueryString
Description copied from class:UriReturns 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.
- Specified by:
rawQueryStringin classUristrict- 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.
-
query
Description copied from class:UriReturns a copy of this instance with a new query. -
addPathSegment
Description copied from class:UriReturns a copy of this instance with a path segment added at the end.- Specified by:
addPathSegmentin classUri
-
fragment
Description copied from class:UriReturns a copy of this instance with a new optional fragment. -
fragment
Description copied from class:UriReturns a copy of this instance with a new fragment. -
toString
-