Package com.symphony.bdk.core.util
Class IdUtil
java.lang.Object
com.symphony.bdk.core.util.IdUtil
Helper class providing Base64 id conversion. Useful for stream or message ids.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
fromUrlSafeId
(String urlSafeBase64Id) Convert the URL-safe encoded stream id to the corresponding original stream id.static String
toUrlSafeId
(String base64Id) Convert the stream id to the corresponding URL-safe encoded stream id.static String
toUrlSafeIdIfNeeded
(String base64Id) Convert the Base64 id to its URL-safe Base64 version if it contains non URL-safe characters.
-
Constructor Details
-
IdUtil
public IdUtil()
-
-
Method Details
-
toUrlSafeIdIfNeeded
Convert the Base64 id to its URL-safe Base64 version if it contains non URL-safe characters.- Parameters:
base64Id
- Base64 id.- Returns:
- Base64 URL-safe id.
-
toUrlSafeId
Convert the stream id to the corresponding URL-safe encoded stream id.Example of usage:
String urlSafeStreamId = StreamUtil.toUrlSafeStreamId("XlU3OH9eVMzq+yss7M/xyn///oxwgbtGbQ==");
-
fromUrlSafeId
Convert the URL-safe encoded stream id to the corresponding original stream id.Example of usage:
String streamId = StreamUtil.fromUrlSafeStreamId("XlU3OH9eVMzq-yss7M_xyn___oxwgbtGbQ");
-