java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.UriBuilder

public class UriBuilder extends Object
A builder for the URI class, taking several optional parameter, constructing a valid URI out of them.
  • 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.
      Builds an URI 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 valid URI, see URI(String)
    • build

      @Nonnull public URI build(@Nullable String scheme, @Nullable String authority, @Nullable String path, @Nullable String query, @Nullable String fragment) throws URISyntaxException
      Builds an URI 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 valid URI, see URI(String)