@InternalApi public final class ByteArrayHelper extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
fromBase64String(java.lang.String base64)
Decodes a base64 encoded string to a byte array.
|
static byte[] |
fromBase64urlString(java.lang.String base64url)
Decodes a base64url encoded string to a byte array.
|
static byte[] |
fromHexString(java.lang.String hexString)
Converts the provided hexadecimal string to a byte array.
|
static int |
indexOf(byte[] array,
byte b)
Returns the index of the first occurrence of
b in array. |
static java.lang.String |
toHexString(byte[] bytes)
Converts the provided byte array to a hexadecimal string
|
public static java.lang.String toHexString(byte[] bytes)
Adapted from https://stackoverflow.com/a/21429909/466862 by higginse
bytes - byte array (not nullpublic static byte[] fromHexString(java.lang.String hexString)
hexString - Hexadecimal stringpublic static byte[] fromBase64String(java.lang.String base64)
base64 - Base64 encoded datapublic static byte[] fromBase64urlString(java.lang.String base64url)
Base64url applies the "URL and Filename safe" Base 64 Alphabet.
base64url - Base64url encoded datapublic static int indexOf(byte[] array,
byte b)
b in array.array - Array to searchb - byte to findb, or -1 if b is not in the arrayCopyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.