public class SdkUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
extractSki(X509Certificate cert) |
static HttpURLConnection |
openHttpConn(URL url) |
static X509Certificate |
parseCert(byte[] certBytes) |
static X509Certificate |
parseCert(File file) |
static X509Certificate |
parseCert(InputStream certStream) |
static byte[] |
read(File file) |
static byte[] |
read(InputStream in) |
static String |
requireNonBlank(String objName,
String obj) |
static <T> T |
requireNonNull(String objName,
T obj) |
static void |
save(File file,
byte[] content) |
static byte[] |
send(URL url,
String httpMethod,
byte[] request,
String requestContentType,
String expectedResponseContentType) |
public static X509Certificate parseCert(File file) throws IOException, CertificateException
IOExceptionCertificateExceptionpublic static X509Certificate parseCert(byte[] certBytes) throws CertificateException
CertificateExceptionpublic static X509Certificate parseCert(InputStream certStream) throws CertificateException
CertificateExceptionpublic static byte[] extractSki(X509Certificate cert) throws CertificateEncodingException
CertificateEncodingExceptionpublic static byte[] read(File file) throws IOException
IOExceptionpublic static byte[] read(InputStream in) throws IOException
IOExceptionpublic static void save(File file, byte[] content) throws IOException
IOExceptionpublic static HttpURLConnection openHttpConn(URL url) throws IOException
IOExceptionpublic static <T> T requireNonNull(String objName, T obj)
public static byte[] send(URL url, String httpMethod, byte[] request, String requestContentType, String expectedResponseContentType) throws IOException
IOExceptionCopyright © 2018. All rights reserved.