Package com.azure.android.core.util
Class Base64Util
- java.lang.Object
-
- com.azure.android.core.util.Base64Util
-
public final class Base64Util extends java.lang.Object
Utility type exposing Base64 encoding and decoding methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
decode(byte[] encoded)
Decodes a base64 encoded byte array.static byte[]
decodeString(java.lang.String encoded)
Decodes a base64 encoded string.static byte[]
decodeURL(byte[] src)
Decodes a byte array in base64 URL format.static byte[]
encode(byte[] src)
Encodes a byte array to base64.static java.lang.String
encodeToString(byte[] src)
Encodes a byte array to a base 64 string.static byte[]
encodeURLWithoutPadding(byte[] src)
Encodes a byte array to base64 URL format.
-
-
-
Method Detail
-
encode
public static byte[] encode(byte[] src)
Encodes a byte array to base64.- Parameters:
src
- the byte array to encode- Returns:
- the base64 encoded bytes
-
encodeURLWithoutPadding
public static byte[] encodeURLWithoutPadding(byte[] src)
Encodes a byte array to base64 URL format.- Parameters:
src
- the byte array to encode- Returns:
- the base64 URL encoded bytes
-
encodeToString
public static java.lang.String encodeToString(byte[] src)
Encodes a byte array to a base 64 string.- Parameters:
src
- the byte array to encode- Returns:
- the base64 encoded string
-
decode
public static byte[] decode(byte[] encoded)
Decodes a base64 encoded byte array.- Parameters:
encoded
- the byte array to decode- Returns:
- the decoded byte array
-
decodeURL
public static byte[] decodeURL(byte[] src)
Decodes a byte array in base64 URL format.- Parameters:
src
- the byte array to decode- Returns:
- the decoded byte array
-
decodeString
public static byte[] decodeString(java.lang.String encoded)
Decodes a base64 encoded string.- Parameters:
encoded
- the string to decode- Returns:
- the decoded byte array
-
-