public abstract class Base64Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
BASE64_CHAR_TABLE
Base64字符的ASSIC码
非-1的数字为Base64字符表中的十进制数字 |
static byte |
MAX_BASE64_BYTE
Base64字符集中,ASSIC码最大的字符:'z'
|
static byte |
MIN_BASE64_BYTE
Base64字符集中,ASSIC码最小的字符:'+'
|
static byte |
PADDING_CHAR
补位字符:'='
|
| Constructor and Description |
|---|
Base64Utils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isBase64(CharSequence cs)
判断是否为Base64字符串
|
static boolean |
isBase64Byte(byte b)
判断是否为Base64字节
|
static boolean |
isBase64Bytes(byte[] bytes)
判断是否为Base64字节数组
|
static boolean |
isBase64Char(char c)
判断是否为Base64字符
|
static boolean |
isBase64Chars(char[] chars)
判断是否为Base64字符数组
|
static String |
normalize(String base64Str)
规范化Base64串.
|
public static final byte[] BASE64_CHAR_TABLE
public static final byte MIN_BASE64_BYTE
public static final byte MAX_BASE64_BYTE
public static final byte PADDING_CHAR
@NonNull public static String normalize(@NonNull String base64Str) throws IllegalArgumentException
base64Str - Base64字符串IllegalArgumentException - 编码有误public static boolean isBase64Char(char c)
c - 字符public static boolean isBase64Byte(byte b)
b - 字节public static boolean isBase64(@Nullable
CharSequence cs)
注:当前方法不考虑换行符!
cs - 字符串public static boolean isBase64Chars(@Nullable
char[] chars)
注:当前方法不考虑换行符!
chars - 字符数组public static boolean isBase64Bytes(@Nullable
byte[] bytes)
注:当前方法不考虑换行符!
bytes - 字节数组Copyright © 2021–2022 EasyJ开源社区. All rights reserved.