public class Utils extends Object
| 限定符和类型 | 字段和说明 | 
|---|---|
static int | 
APP_ID_LENGTH  | 
static long | 
HMAC_SHA256_LENGTH  | 
static int | 
VERSION_LENGTH  | 
| 构造器和说明 | 
|---|
Utils()  | 
| 限定符和类型 | 方法和说明 | 
|---|---|
static byte[] | 
base64Decode(String data)  | 
static String | 
base64Encode(byte[] data)  | 
static byte[] | 
compress(byte[] data)  | 
static int | 
crc32(byte[] bytes)  | 
static int | 
crc32(String data)  | 
static byte[] | 
decode(byte[] src)  | 
static byte[] | 
decompress(byte[] data)  | 
static byte[] | 
encode(byte[] src)  | 
static int | 
getTimestamp()  | 
static byte[] | 
hmacSign(String keyString,
        byte[] msg)  | 
static boolean | 
isUUID(String uuid)  | 
static byte[] | 
pack(PackableEx packableEx)  | 
static int | 
randomInt()  | 
static void | 
unpack(byte[] data,
      PackableEx packableEx)  | 
public static final long HMAC_SHA256_LENGTH
public static final int VERSION_LENGTH
public static final int APP_ID_LENGTH
public static byte[] encode(byte[] src)
public static byte[] decode(byte[] src)
public static byte[] hmacSign(String keyString, byte[] msg) throws InvalidKeyException, NoSuchAlgorithmException
public static byte[] pack(PackableEx packableEx)
public static void unpack(byte[] data,
                          PackableEx packableEx)
public static String base64Encode(byte[] data)
public static byte[] base64Decode(String data)
public static int crc32(String data)
public static int crc32(byte[] bytes)
public static int getTimestamp()
public static int randomInt()
public static boolean isUUID(String uuid)
public static byte[] compress(byte[] data)
public static byte[] decompress(byte[] data)
Copyright © 2024. All rights reserved.