Base64, available since JDK 8@Deprecated public class Base64 extends Object
| Constructor and Description |
|---|
Base64()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(char[] data)
Deprecated.
Decodes a byte array from Base64 format.
|
static byte[] |
decode(String str)
Deprecated.
Decodes a byte array from Base64 format.
|
static String |
decodePassword(String password)
Deprecated.
Decode a string value that is possibly encoded into a clear string.
|
static String |
decodeString(String str)
Deprecated.
Decodes a string from a UTF-8 Base64 string.
|
static char[] |
encode(byte[] data)
Deprecated.
Encodes a byte array into Base64 format.
|
static char[] |
encode(byte[] data,
int iLen)
Deprecated.
Encodes a byte array into Base64 format.
|
static String |
encode(InputStream is)
Deprecated.
|
static String |
encodePassword(String password)
Deprecated.
Encode a password-type string value.
|
static String |
encodeString(String str)
Deprecated.
Encodes a string into UTF-8 Base64 format.
|
public static String encodeString(String str)
str - the String to be encoded.public static char[] encode(byte[] data)
data - the array containing the data bytes to be encoded.public static char[] encode(byte[] data,
int iLen)
data - the array containing the data bytes to be encoded.iLen - the number of bytes to process in in.public static String decodeString(String str)
str - the Base64 String to be decoded.IllegalArgumentException - if the input is not valid Base64 encoded data.public static byte[] decode(String str)
str - the Base64 String to be decoded.IllegalArgumentException - if the input is not valid Base64 encoded data.public static byte[] decode(char[] data)
data - the character array containing the Base64 encoded data.IllegalArgumentException - if the input is not valid Base64 encoded data.public static String encode(InputStream is)
public static String encodePassword(String password)
password - the password (in clear).decodePassword(String)Copyright © 2022. All rights reserved.