Class Base64


  • public final class Base64
    extends java.lang.Object
    Implements the "base64" binary encoding scheme as defined by RFC 2045.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] decode​(java.lang.String encoded)
      Decodes the specified base64 string back into its raw data.
      static java.lang.String encode​(byte[] bytes)
      Encodes the specified data into a base64 string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • encode

        public static java.lang.String encode​(byte[] bytes)
        Encodes the specified data into a base64 string.
        Parameters:
        bytes - The unencoded raw data.
        Returns:
        The base64 encoded string.
      • decode

        public static byte[] decode​(java.lang.String encoded)
        Decodes the specified base64 string back into its raw data.
        Parameters:
        encoded - The base64 encoded string.
        Returns:
        The decoded data bytes.