Package com.alibaba.druid.util
Class Base64
- java.lang.Object
-
- com.alibaba.druid.util.Base64
-
public class Base64 extends Object
Static methods for translating Base64 encoded strings to byte arrays and vice-versa.- Since:
- 1.4
- Version:
- %I%, %G%
- Author:
- Josh Bloch
-
-
Constructor Summary
Constructors Constructor Description Base64()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]altBase64ToByteArray(String s)Translates the specified "alternate representation" Base64 string into a byte array.static byte[]base64ToByteArray(String s)Translates the specified Base64 string (as per Preferences.get(byte[])) into a byte array.static StringbyteArrayToAltBase64(byte[] a)Translates the specified byte array into an "alternate representation" Base64 string.static StringbyteArrayToBase64(byte[] a)Translates the specified byte array into a Base64 string as per Preferences.put(byte[]).
-
-
-
Method Detail
-
byteArrayToBase64
public static String byteArrayToBase64(byte[] a)
Translates the specified byte array into a Base64 string as per Preferences.put(byte[]).
-
byteArrayToAltBase64
public static String byteArrayToAltBase64(byte[] a)
Translates the specified byte array into an "alternate representation" Base64 string. This non-standard variant uses an alphabet that does not contain the uppercase alphabetic characters, which makes it suitable for use in situations where case-folding occurs.
-
base64ToByteArray
public static byte[] base64ToByteArray(String s)
Translates the specified Base64 string (as per Preferences.get(byte[])) into a byte array.
-
altBase64ToByteArray
public static byte[] altBase64ToByteArray(String s)
Translates the specified "alternate representation" Base64 string into a byte array.
-
-