public class CompatibleUrlConnClient extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ACCEPT_ENCODING |
| Constructor and Description |
|---|
CompatibleUrlConnClient() |
| Modifier and Type | Method and Description |
|---|---|
HttpURLConnection |
buildHttpConnection(HttpRequest request) |
void |
checkHttpRequest(HttpRequest request) |
void |
close() |
static HttpResponse |
compatibleGetResponse(HttpRequest request) |
SSLSocketFactory |
createSSLSocketFactory() |
HttpURLConnection |
initHttpConnection(URL url,
HttpRequest request) |
void |
parseHttpConn(HttpResponse response,
HttpURLConnection httpConn,
InputStream content,
Exception e) |
byte[] |
readContent(InputStream content) |
void |
setConnectionTimeout(HttpURLConnection httpConn,
HttpRequest request) |
HttpResponse |
syncInvoke(HttpRequest request) |
protected static final String ACCEPT_ENCODING
public static HttpResponse compatibleGetResponse(HttpRequest request) throws IOException, NoSuchAlgorithmException, KeyManagementException
public HttpResponse syncInvoke(HttpRequest request) throws IOException, KeyManagementException, NoSuchAlgorithmException
public SSLSocketFactory createSSLSocketFactory() throws NoSuchAlgorithmException, KeyManagementException
public void checkHttpRequest(HttpRequest request)
public HttpURLConnection initHttpConnection(URL url, HttpRequest request) throws IOException, KeyManagementException, NoSuchAlgorithmException
public void setConnectionTimeout(HttpURLConnection httpConn, HttpRequest request)
public HttpURLConnection buildHttpConnection(HttpRequest request) throws IOException, NoSuchAlgorithmException, KeyManagementException
public void parseHttpConn(HttpResponse response, HttpURLConnection httpConn, InputStream content, Exception e) throws IOException, NoSuchAlgorithmException
IOExceptionNoSuchAlgorithmExceptionpublic byte[] readContent(InputStream content) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2020. All rights reserved.