Package com.google.api.client.util
Class Base64
- java.lang.Object
-
- com.google.api.client.util.Base64
-
@Deprecated public class Base64 extends java.lang.Object
Deprecated.use com.google.common.io.BaseEncoding#base64Proxy for handling Base64 encoding/decoding.- Since:
- 1.8
-
-
Field Summary
Fields Modifier and Type Field Description private static com.google.common.io.BaseEncoding
BASE64_DECODER
Deprecated.private static com.google.common.io.BaseEncoding
BASE64URL_DECODER
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description private
Base64()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static byte[]
decodeBase64(byte[] base64Data)
Deprecated.Decodes Base64 data into octets.static byte[]
decodeBase64(java.lang.String base64String)
Deprecated.Decodes a Base64 String into octets.static byte[]
encodeBase64(byte[] binaryData)
Deprecated.Encodes binary data using the base64 algorithm but does not chunk the output.static java.lang.String
encodeBase64String(byte[] binaryData)
Deprecated.Encodes binary data using the base64 algorithm but does not chunk the output.static byte[]
encodeBase64URLSafe(byte[] binaryData)
Deprecated.Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.static java.lang.String
encodeBase64URLSafeString(byte[] binaryData)
Deprecated.Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.
-
-
-
Method Detail
-
encodeBase64
public static byte[] encodeBase64(byte[] binaryData)
Deprecated.Encodes binary data using the base64 algorithm but does not chunk the output.- Parameters:
binaryData
- binary data to encode ornull
fornull
result- Returns:
- byte[] containing Base64 characters in their UTF-8 representation or
null
fornull
input
-
encodeBase64String
public static java.lang.String encodeBase64String(byte[] binaryData)
Deprecated.Encodes binary data using the base64 algorithm but does not chunk the output.- Parameters:
binaryData
- binary data to encode ornull
fornull
result- Returns:
- String containing Base64 characters or
null
fornull
input
-
encodeBase64URLSafe
public static byte[] encodeBase64URLSafe(byte[] binaryData)
Deprecated.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.- Parameters:
binaryData
- binary data to encode ornull
fornull
result- Returns:
- byte[] containing Base64 characters in their UTF-8 representation or
null
fornull
input
-
encodeBase64URLSafeString
public static java.lang.String encodeBase64URLSafeString(byte[] binaryData)
Deprecated.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.- Parameters:
binaryData
- binary data to encode ornull
fornull
result- Returns:
- String containing Base64 characters or
null
fornull
input
-
decodeBase64
public static byte[] decodeBase64(byte[] base64Data)
Deprecated.Decodes Base64 data into octets. Note that this method handles both URL-safe and non-URL-safe base 64 encoded inputs.- Parameters:
base64Data
- Byte array containing Base64 data ornull
fornull
result- Returns:
- Array containing decoded data or
null
fornull
input
-
decodeBase64
public static byte[] decodeBase64(java.lang.String base64String)
Deprecated.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.
- Parameters:
base64String
- String containing Base64 data ornull
fornull
result- Returns:
- Array containing decoded data or
null
fornull
input
-
-