@API(status=EXPERIMENTAL)
public class IdUtil
extends java.lang.Object
Constructor and Description |
---|
IdUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fromUrlSafeId(java.lang.String urlSafeBase64Id)
Convert the URL-safe encoded stream id to the corresponding original stream id.
|
static java.lang.String |
toUrlSafeId(java.lang.String base64Id)
Convert the stream id to the corresponding URL-safe encoded stream id.
|
static java.lang.String |
toUrlSafeIdIfNeeded(java.lang.String base64Id)
Convert the Base64 id to its URL-safe Base64 version if it contains non URL-safe characters.
|
public static java.lang.String toUrlSafeIdIfNeeded(java.lang.String base64Id)
base64Id
- Base64 id.public static java.lang.String toUrlSafeId(java.lang.String base64Id)
Example of usage:
String urlSafeStreamId = StreamUtil.toUrlSafeStreamId("XlU3OH9eVMzq+yss7M/xyn///oxwgbtGbQ==");
public static java.lang.String fromUrlSafeId(java.lang.String urlSafeBase64Id)
Example of usage:
String streamId = StreamUtil.fromUrlSafeStreamId("XlU3OH9eVMzq-yss7M_xyn___oxwgbtGbQ");