Class UriBuilder
java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.UriBuilder
A builder for the
URI
class, taking several optional parameter, constructing a valid URI out of them.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
UriBuilder
public UriBuilder()
-
-
Method Details
-
build
@Nonnull @Deprecated public URI build(@Nullable String scheme, @Nullable String userInfo, @Nullable String host, int port, @Nullable String path, @Nullable String query, @Nullable String fragment) throws URISyntaxException Deprecated.Please usebuild(String, String, String, String, String)
instead.Builds anURI
based on the given parameter.- Parameters:
scheme
- The connection scheme of the URI.userInfo
- The user information for the URI.host
- The connection host of the URI.port
- The port to connect on. Use -1 to ignore the port.path
- The path to the resource on the host (if the host is given).query
- The query to append to the URI.fragment
- Any remaining fragments that should be appended to the URI.- Returns:
- A valid URI bases on the components given.
- Throws:
URISyntaxException
- If the given parameter cannot be combined into a validURI
, seeURI(String)
-
build
@Nonnull public URI build(@Nullable String scheme, @Nullable String authority, @Nullable String path, @Nullable String query, @Nullable String fragment) throws URISyntaxException Builds anURI
based on the given parameter.- Parameters:
scheme
- The connection scheme of the URI.authority
- The authority of the URI.path
- The path to the resource on the host (if the host is given).query
- The query to append to the URI.fragment
- Any remaining fragments that should be appended to the URI.- Returns:
- A valid URI bases on the components given.
- Throws:
URISyntaxException
- If the given parameter cannot be combined into a validURI
, seeURI(String)
-
build(String, String, String, String, String)
instead.