Class Base64Utils


  • public final class Base64Utils
    extends Object
    Base64 utilities.
    Author:
    Adrian Herscu
    • 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