Class Base64 (1.43.0)

public class Base64

Deprecated. use com.google.common.io.BaseEncoding#base64

Proxy for handling Base64 encoding/decoding.

Inheritance

java.lang.Object > Base64

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
NameDescription
base64Databyte[]

Byte array containing Base64 data or null for null result

Returns
TypeDescription
byte[]

Array containing decoded data or null for null input

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.

Parameter
NameDescription
base64StringString

String containing Base64 data or null for null result

Returns
TypeDescription
byte[]

Array containing decoded data or null for null input

encodeBase64(byte[] binaryData) (deprecated)

public static byte[] encodeBase64(byte[] binaryData)

Encodes binary data using the base64 algorithm but does not chunk the output.

Parameter
NameDescription
binaryDatabyte[]

binary data to encode or null for null result

Returns
TypeDescription
byte[]

byte[] containing Base64 characters in their UTF-8 representation or null for null input

encodeBase64String(byte[] binaryData) (deprecated)

public static String encodeBase64String(byte[] binaryData)

Encodes binary data using the base64 algorithm but does not chunk the output.

Parameter
NameDescription
binaryDatabyte[]

binary data to encode or null for null result

Returns
TypeDescription
String

String containing Base64 characters or null for null input

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
NameDescription
binaryDatabyte[]

binary data to encode or null for null result

Returns
TypeDescription
byte[]

byte[] containing Base64 characters in their UTF-8 representation or null for null input

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
NameDescription
binaryDatabyte[]

binary data to encode or null for null result

Returns
TypeDescription
String

String containing Base64 characters or null for null input