public class BytesUtil extends Object
限定符和类型 | 方法和说明 |
---|---|
static byte[] |
fromBase64(@NonNull String text)
base64字符串转换为字节数组
|
static byte[] |
fromHexString(@NonNull String text)
16进制字符串转换为字节数组
|
static void |
notEmpty(byte... bytes)
校验
|
static String |
toBase64(byte... bytes)
字节数组转换成base64字符串
|
static String |
toHexString(byte... bytes)
字节数组转换成16进制字符串
|
public static String toHexString(byte... bytes)
bytes
- 字节数组public static byte[] fromHexString(@NonNull @NonNull String text)
text
- 16进制字符串public static String toBase64(byte... bytes)
bytes
- 字节数组public static byte[] fromBase64(@NonNull @NonNull String text)
text
- base64字符串public static void notEmpty(byte... bytes)
bytes
- 字节数组