Package com.google.api.client.util
Class Base64
java.lang.Object
com.google.api.client.util.Base64
Deprecated.
use com.google.common.io.BaseEncoding#base64
Proxy for handling Base64 encoding/decoding.
- Since:
- 1.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.google.common.io.BaseEncoding
Deprecated.private static final com.google.common.io.BaseEncoding
Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
decodeBase64
(byte[] base64Data) Deprecated.Decodes Base64 data into octets.static byte[]
decodeBase64
(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 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 String
encodeBase64URLSafeString
(byte[] binaryData) Deprecated.Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output.
-
Field Details
-
BASE64_DECODER
private static final com.google.common.io.BaseEncoding BASE64_DECODERDeprecated. -
BASE64URL_DECODER
private static final com.google.common.io.BaseEncoding BASE64URL_DECODERDeprecated.
-
-
Constructor Details
-
Base64
private Base64()Deprecated.
-
-
Method Details
-
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
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
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
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
-