public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static long |
crc32(byte[] bytes) |
static long |
crc32(InputStream inputStream) |
static long |
crc64Ecma(InputStream inputStream) |
static String |
encode(Map<String,List<String>> v) |
static IVodUploadStrategy |
getVodUploadCoreInstance(int uploadStrategy) |
static IVodUploadStrategy |
getVodUploadCoreInstance(int uploadStrategy,
long chunkSize) |
static String |
hashSHA256(byte[] content) |
static byte[] |
hmacSHA1(byte[] key,
String content) |
static byte[] |
hmacSHA256(byte[] key,
String content) |
static List<org.apache.http.NameValuePair> |
mapToPairList(Map<String,String> params) |
static InputStream |
newRepeatableInputStream(InputStream original) |
static InputStream |
newRepeatableInputStream(PartInputStream original) |
static Map<String,String> |
paramsToMap(Object obj) |
static List<org.apache.http.NameValuePair> |
paramsToPair(Object obj) |
static Map<String,String> |
protoBufferToMap(com.google.protobuf.MessageOrBuilder obj,
boolean needDefaultValueFields) |
static String |
randWeights(Map<String,Integer> weightsMap,
String excludeDomain) |
public static List<org.apache.http.NameValuePair> mapToPairList(Map<String,String> params)
public static byte[] hmacSHA256(byte[] key,
String content)
throws Exception
Exceptionpublic static byte[] hmacSHA1(byte[] key,
String content)
throws Exception
Exceptionpublic static long crc32(InputStream inputStream) throws Exception
Exceptionpublic static long crc64Ecma(InputStream inputStream) throws Exception
Exceptionpublic static InputStream newRepeatableInputStream(PartInputStream original) throws IOException
IOExceptionpublic static InputStream newRepeatableInputStream(InputStream original) throws IOException
IOExceptionpublic static IVodUploadStrategy getVodUploadCoreInstance(int uploadStrategy, long chunkSize)
public static IVodUploadStrategy getVodUploadCoreInstance(int uploadStrategy)
Copyright © 2025. All rights reserved.