public class Base64
Deprecated. use com.google.common.io.BaseEncoding#base64
Proxy for handling Base64 encoding/decoding.
Static Methods
decodeBase64(byte[] base64Data) (deprecated)
public static byte[] decodeBase64(byte[] base64Data)
Decodes Base64 data into octets. Note that this method handles both URL-safe and non-URL-safe base 64 encoded inputs.
Parameter | |
---|---|
Name | Description |
base64Data |
byte[] Byte array containing Base64 data or |
Returns | |
---|---|
Type | Description |
byte[] |
Array containing decoded data or |
decodeBase64(String base64String) (deprecated)
public static byte[] decodeBase64(String base64String)
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.
Parameter | |
---|---|
Name | Description |
base64String |
String String containing Base64 data or |
Returns | |
---|---|
Type | Description |
byte[] |
Array containing decoded data or |
encodeBase64(byte[] binaryData) (deprecated)
public static byte[] encodeBase64(byte[] binaryData)
Encodes binary data using the base64 algorithm but does not chunk the output.
Parameter | |
---|---|
Name | Description |
binaryData |
byte[] binary data to encode or |
Returns | |
---|---|
Type | Description |
byte[] |
byte[] containing Base64 characters in their UTF-8 representation or |
encodeBase64String(byte[] binaryData) (deprecated)
public static String encodeBase64String(byte[] binaryData)
Encodes binary data using the base64 algorithm but does not chunk the output.
Parameter | |
---|---|
Name | Description |
binaryData |
byte[] binary data to encode or |
Returns | |
---|---|
Type | Description |
String |
String containing Base64 characters or |
encodeBase64URLSafe(byte[] binaryData) (deprecated)
public static byte[] encodeBase64URLSafe(byte[] binaryData)
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.
Parameter | |
---|---|
Name | Description |
binaryData |
byte[] binary data to encode or |
Returns | |
---|---|
Type | Description |
byte[] |
byte[] containing Base64 characters in their UTF-8 representation or |
encodeBase64URLSafeString(byte[] binaryData) (deprecated)
public static String encodeBase64URLSafeString(byte[] binaryData)
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.
Parameter | |
---|---|
Name | Description |
binaryData |
byte[] binary data to encode or |
Returns | |
---|---|
Type | Description |
String |
String containing Base64 characters or |