public final class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
canonicalMetadataKey(String meta) |
static HttpURLConnection |
createHttpConnection(URL endpointUrl,
String httpMethod,
Map<String,String> headers,
int connectTimeoutMs,
int readTimeoutMs) |
static byte[] |
sha256(byte[] data) |
static byte[] |
sha256(String text)
Hashes the string contents (assumed to be UTF-8) using the SHA-256 algorithm.
|
static String |
toHex(byte[] data)
Converts byte data to a Hex-encoded string.
|
static URL |
toUrl(String url) |
static String |
urlEncode(String url,
boolean keepPathSlash) |
public static HttpURLConnection createHttpConnection(URL endpointUrl, String httpMethod, Map<String,String> headers, int connectTimeoutMs, int readTimeoutMs)
public static String toHex(byte[] data)
data - data to hex encode.public static byte[] sha256(String text)
public static byte[] sha256(byte[] data)
Copyright © 2021. All rights reserved.