Package com.azure.android.core.util
Class Base64Url
- java.lang.Object
-
- com.azure.android.core.util.Base64Url
-
public final class Base64Url extends java.lang.Object
Encodes 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 Base64Url
encode(byte[] bytes)
Encodes a byte array into Base64Url encoded bytes.byte[]
encodedBytes()
Returns the underlying encoded byte array.boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-