Package com.nimbusds.jose.util
Class Base64URL
- java.lang.Object
-
- com.nimbusds.jose.util.Base64
-
- com.nimbusds.jose.util.Base64URL
-
- All Implemented Interfaces:
java.io.Serializable
@Immutable public class Base64URL extends Base64
Base64URL-encoded object.Related specifications:
- RFC 4648.
- Version:
- 2019-10-04
- Author:
- Vladimir Dzhuvinov
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Base64URL(java.lang.String base64URL)Creates a new Base64URL-encoded object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Base64URLencode(byte[] bytes)Base64URL-encodes the specified byte array.static Base64URLencode(java.lang.String text)Base64URL-encodes the specified string.static Base64URLencode(java.math.BigInteger bigInt)Base64URL-encodes the specified big integer, without the sign bit.booleanequals(java.lang.Object object)OverridesObject.equals().static Base64URLfrom(java.lang.String base64URL)Creates a new Base64URL-encoded object from the specified string.-
Methods inherited from class com.nimbusds.jose.util.Base64
decode, decodeToBigInteger, decodeToString, hashCode, toJSONString, toString
-
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
OverridesObject.equals().
-
from
public static Base64URL from(java.lang.String base64URL)
Creates a new Base64URL-encoded object from the specified string.- Parameters:
base64URL- The Base64URL-encoded object value,nullif not specified. The value is not validated for having characters from the Base64URL alphabet.- Returns:
- The Base64URL-encoded object,
nullif not specified.
-
encode
public static Base64URL encode(byte[] bytes)
Base64URL-encodes the specified byte array.- Parameters:
bytes- The byte array to encode. Must not benull.- Returns:
- The resulting Base64URL object.
-
encode
public static Base64URL encode(java.math.BigInteger bigInt)
Base64URL-encodes the specified big integer, without the sign bit.- Parameters:
bigInt- The big integer to encode. Must not benull.- Returns:
- The resulting Base64URL object.
-
encode
public static Base64URL encode(java.lang.String text)
Base64URL-encodes the specified string.- Parameters:
text- The string to encode. Must be in the UTF-8 character set and notnull.- Returns:
- The resulting Base64URL object.
-
-