Package dev.aherscu.qa.testing.utils
Class Base64Utils
- java.lang.Object
-
- dev.aherscu.qa.testing.utils.Base64Utils
-
public final class Base64Utils extends Object
Base64 utilities.- Author:
- Adrian Herscu
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
encode(long l)
Encodes a specified long in short textual format compatible with URI spec.static String
encode(UUID uuid)
Encodes a specified UUID in short textual format compatible with URI spec.
-
-
-
Method Detail
-
encode
public static String encode(UUID uuid)
Encodes a specified UUID in short textual format compatible with URI spec.- Parameters:
uuid
- a UUID (16 bytes)- Returns:
- a 22 character Base64-encoded string of given UUID
- Throws:
NullPointerException
- if the UUID is null
-
encode
public static String encode(long l)
Encodes a specified long in short textual format compatible with URI spec.- Parameters:
l
- a long (8-bytes)- Returns:
- a 11 character Base64-encoded string of given long
-
-