Class Base64


  • @Deprecated
    public class Base64
    extends java.lang.Object
    Deprecated.
    use com.google.common.io.BaseEncoding#base64
    Proxy for handling Base64 encoding/decoding.
    Since:
    1.8
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static com.google.common.io.BaseEncoding BASE64_DECODER
      Deprecated.
       
      private static com.google.common.io.BaseEncoding BASE64URL_DECODER
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Base64()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static byte[] decodeBase64​(byte[] base64Data)
      Deprecated.
      Decodes Base64 data into octets.
      static byte[] decodeBase64​(java.lang.String base64String)
      Deprecated.
      Decodes a Base64 String into octets.
      static byte[] encodeBase64​(byte[] binaryData)
      Deprecated.
      Encodes binary data using the base64 algorithm but does not chunk the output.
      static java.lang.String encodeBase64String​(byte[] binaryData)
      Deprecated.
      Encodes binary data using the base64 algorithm but does not chunk the output.
      static byte[] encodeBase64URLSafe​(byte[] binaryData)
      Deprecated.
      Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.
      static java.lang.String encodeBase64URLSafeString​(byte[] binaryData)
      Deprecated.
      Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.
      • Methods inherited from class java.lang.Object

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

      • BASE64_DECODER

        private static final com.google.common.io.BaseEncoding BASE64_DECODER
        Deprecated.
      • BASE64URL_DECODER

        private static final com.google.common.io.BaseEncoding BASE64URL_DECODER
        Deprecated.
    • Constructor Detail

      • Base64

        private Base64()
        Deprecated.
    • Method Detail

      • encodeBase64

        public static byte[] encodeBase64​(byte[] binaryData)
        Deprecated.
        Encodes binary data using the base64 algorithm but does not chunk the output.
        Parameters:
        binaryData - binary data to encode or null for null result
        Returns:
        byte[] containing Base64 characters in their UTF-8 representation or null for null input
      • encodeBase64String

        public static java.lang.String encodeBase64String​(byte[] binaryData)
        Deprecated.
        Encodes binary data using the base64 algorithm but does not chunk the output.
        Parameters:
        binaryData - binary data to encode or null for null result
        Returns:
        String containing Base64 characters or null for null input
      • encodeBase64URLSafe

        public static byte[] encodeBase64URLSafe​(byte[] binaryData)
        Deprecated.
        Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The url-safe variation emits - and _ instead of + and / characters.
        Parameters:
        binaryData - binary data to encode or null for null result
        Returns:
        byte[] containing Base64 characters in their UTF-8 representation or null for null input
      • encodeBase64URLSafeString

        public static java.lang.String encodeBase64URLSafeString​(byte[] binaryData)
        Deprecated.
        Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The url-safe variation emits - and _ instead of + and / characters.
        Parameters:
        binaryData - binary data to encode or null for null result
        Returns:
        String containing Base64 characters or null for null input
      • decodeBase64

        public static byte[] decodeBase64​(byte[] base64Data)
        Deprecated.
        Decodes Base64 data into octets. Note that this method handles both URL-safe and non-URL-safe base 64 encoded inputs.
        Parameters:
        base64Data - Byte array containing Base64 data or null for null result
        Returns:
        Array containing decoded data or null for null input
      • decodeBase64

        public static byte[] decodeBase64​(java.lang.String base64String)
        Deprecated.
        Decodes a Base64 String into octets. Note that this method handles both URL-safe and non-URL-safe base 64 encoded strings.

        For the compatibility with the old version that used Apache Commons Coded's decodeBase64, this method discards new line characters and trailing whitespaces.

        Parameters:
        base64String - String containing Base64 data or null for null result
        Returns:
        Array containing decoded data or null for null input