public class CommonUtil extends Object
| 构造器和说明 |
|---|
CommonUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
base64Decode(String encrypt) |
static String |
base64Encode(byte[] data) |
static Boolean |
equals(String str1,
String str2)
"" 等同于null处理
|
static Boolean |
isEmpty(String str1) |
static String |
NVLL(String str1)
trim string, include convert null to ""; if str1 is null, will return "";
|
static String |
randomStr(int length)
生成固定长度随机串
|
static String |
randomStr(int min,
int max)
生成随即串
|
static String |
readPemFile2String(String fileName) |
static byte[] |
subBytes(byte[] src,
int begin,
int count) |
public static String NVLL(String str1)
str1 - 入参public static Boolean equals(String str1, String str2)
str1 - 参数1str2 - 参数2public static byte[] subBytes(byte[] src,
int begin,
int count)
public static String readPemFile2String(String fileName) throws IOException
IOExceptionpublic static String randomStr(int min, int max)
min - 最小程度max - 最大长度public static String randomStr(int length)
length - public static byte[] base64Decode(String encrypt)
public static String base64Encode(byte[] data)
Copyright © 2020. All rights reserved.