Package com.azure.android.core.util
Class Base64Url
- java.lang.Object
-
- com.azure.android.core.util.Base64Url
-
public final class Base64Url extends java.lang.ObjectEncodes and decodes using Base64 URL encoding.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decodedBytes()Decode the bytes and returns its value.static Base64Urlencode(byte[] bytes)Encodes a byte array into Base64Url encoded bytes.byte[]encodedBytes()Returns the underlying encoded byte array.booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Base64Url
public Base64Url(java.lang.String string)
Creates a new Base64Url object with the specified encoded string.- Parameters:
string- The encoded string.
-
Base64Url
public Base64Url(byte[] bytes)
Creates a new Base64Url object with the specified encoded bytes.- Parameters:
bytes- The encoded bytes.
-
-
Method Detail
-
encode
public static Base64Url encode(byte[] bytes)
Encodes a byte array into Base64Url encoded bytes.- Parameters:
bytes- The byte array to encode.- Returns:
- A new Base64Url instance.
-
encodedBytes
public byte[] encodedBytes()
Returns the underlying encoded byte array.- Returns:
- The underlying encoded byte array.
-
decodedBytes
public byte[] decodedBytes()
Decode the bytes and returns its value.- Returns:
- The decoded byte array.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-