Class Base64


  • public final class Base64
    extends Object

    Provides Base64 encoding and decoding.

    This class implements Base64 encoding

    Thanks to Apache Commons project. This class refactored from org.apache.commons.codec.binary

    Original Thanks to commons project in ws.apache.org for this code.

    Since:
    3.5
    • Method Detail

      • decode

        public static byte[] decode​(String s)
        Decodes the given Base64-encoded string.
        Parameters:
        s - the Base64-encoded string
        Returns:
        the decoded byte array
      • encode

        public static String encode​(byte[] in)
        Encodes the given byte array into a Base64-encoded string.
        Parameters:
        in - the byte array
        Returns:
        the Base64-encoded string