Package org.apache.pinot.common.utils
Class URIUtils
- java.lang.Object
-
- org.apache.pinot.common.utils.URIUtils
-
public class URIUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URIbuildURI(String schema, String host, int port, String path, Map<String,String> params)Builds the URI using the schema, host, port, path and map of params.static URIbuildURI(String schema, String hostPort, String path, Map<String,String> params)Builds the URI using the schema, host, port, path and map of params.static StringconstructDownloadUrl(String baseUrl, String rawTableName, String segmentName)Returns the download URL with the segment name encoded.static Stringdecode(String string)static Stringencode(String string)static StringgetPath(String basePath, String... parts)Returns the path for the given base path and optional parts.static URIgetUri(String path)Returns the URI for the given path, appends the local (file) scheme to the URI if no scheme exists.static URIgetUri(String basePath, String... parts)Returns the URI for the given base path and optional parts, appends the local (file) scheme to the URI if no scheme exists.
-
-
-
Method Detail
-
getUri
public static URI getUri(String path)
Returns the URI for the given path, appends the local (file) scheme to the URI if no scheme exists.
-
getUri
public static URI getUri(String basePath, String... parts)
Returns the URI for the given base path and optional parts, appends the local (file) scheme to the URI if no scheme exists. All the parts will be appended to the base path with the file separator.
-
getPath
public static String getPath(String basePath, String... parts)
Returns the path for the given base path and optional parts. All the parts will be appended to the base path with the file separator.
-
constructDownloadUrl
public static String constructDownloadUrl(String baseUrl, String rawTableName, String segmentName)
Returns the download URL with the segment name encoded.
-
buildURI
public static URI buildURI(String schema, String hostPort, String path, Map<String,String> params)
Builds the URI using the schema, host, port, path and map of params. The URI builder automatically encodes fields as needed
-
-