core/src/main/java/org/apache/druid/data/input/impl/CloudObjectLocation.java
/**
   * Given a scheme, encode {@link #bucket} and {@link #path} into a {@link URI}.
   *
   * In all clouds bucket names must be dns compliant, so it does not require encoding
   * There is no such restriction on object names, so they will be URL encoded when constructing the URI
   */
Given a scheme, encode  #bucket and  #path into a  URI.
In all clouds bucket names must be dns compliant, so it does not require encoding
There is no such restriction on object names, so they will be URL encoded when constructing the URI
Given a scheme encode #bucket and #path into a URI . In all clouds bucket names must be dns compliant so it does not require encoding There is no such restriction on object names so they will be URL encoded when constructing the URI
public URI toUri(String scheme)
  {
    return URI.create(
        StringUtils.format(
            "%s://%s/%s",
            scheme,
            bucket,
            StringUtils.replace(StringUtils.urlEncode(path), "%2F", "/")
        )
    );
  }
public URI toUri ( String scheme ) { return URI . create ( StringUtils . format ( "%s://%s/%s" , scheme , bucket , StringUtils . replace ( StringUtils . urlEncode ( path ) , "%2F" , "/" ) ) ) ; }
Given a scheme, encode {@link #bucket} and {@link #path} into a {@link URI}.
Given a scheme encode { @link #bucket } and { @link #path } into a { @link URI } .
// Encode path, except leave '/' characters unencoded