Class Base64Url


  • public final class Base64Url
    extends java.lang.Object
    Encodes and decodes using Base64 URL encoding.
    • Constructor Summary

      Constructors 
      Constructor Description
      Base64Url​(byte[] bytes)
      Creates a new Base64Url object with the specified encoded bytes.
      Base64Url​(java.lang.String string)
      Creates a new Base64Url object with the specified encoded string.
    • Constructor Detail

      • Base64Url

        public Base64Url​(java.lang.String string)
        Creates a new Base64Url object with the specified encoded string.
        Parameters:
        string - The encoded string.
      • Base64Url

        public Base64Url​(byte[] bytes)
        Creates a new Base64Url object with the specified encoded bytes.
        Parameters:
        bytes - The encoded bytes.
    • Method Detail

      • encode

        public static Base64Url encode​(byte[] bytes)
        Encodes a byte array into Base64Url encoded bytes.
        Parameters:
        bytes - The byte array to encode.
        Returns:
        A new Base64Url instance.
      • encodedBytes

        public byte[] encodedBytes()
        Returns the underlying encoded byte array.
        Returns:
        The underlying encoded byte array.
      • decodedBytes

        public byte[] decodedBytes()
        Decode the bytes and returns its value.
        Returns:
        The decoded byte array.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object