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