public final class Base64 extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(String data)
Decodes a given Base64 string into its corresponding byte array.
|
static Byte[] |
decodeAsByteObjectArray(String data)
Decodes a given Base64 string into its corresponding byte array.
|
static String |
encode(byte[] data)
Encodes a byte array as a Base64 string.
|
static String |
encode(Byte[] data)
Encodes a byte array as a Base64 string.
|
static boolean |
validateIsBase64String(String data)
Determines whether the given string contains only Base64 characters.
|
public static byte[] decode(String data)
data - the Base64 string, as a String object, to decodeIllegalArgumentException - If the string is not a valid base64 encoded stringpublic static Byte[] decodeAsByteObjectArray(String data)
data - the Base64 string, as a String object, to decodeIllegalArgumentException - If the string is not a valid base64 encoded stringpublic static String encode(byte[] data)
data - the byte array to encodeString objectpublic static String encode(Byte[] data)
data - the byte array to encodeString objectpublic static boolean validateIsBase64String(String data)
data - the string, as a String object, to validatetrue if data is a valid Base64 string, otherwise falseCopyright © 2019. All rights reserved.