public final class OkHttpsURLConnection extends HttpsURLConnection
hostnameVerifierchunkLength, fixedContentLength, fixedContentLengthLong, HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessageallowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
OkHttpsURLConnection(OkHttpURLConnection delegate) |
OkHttpsURLConnection(URL url,
OkHttpClient client) |
OkHttpsURLConnection(URL url,
OkHttpClient client,
URLFilter filter) |
getDefaultHostnameVerifier, getDefaultSSLSocketFactory, setDefaultHostnameVerifier, setDefaultSSLSocketFactorygetFollowRedirects, setFollowRedirectspublic OkHttpsURLConnection(URL url, OkHttpClient client)
public OkHttpsURLConnection(URL url, OkHttpClient client, URLFilter filter)
public OkHttpsURLConnection(OkHttpURLConnection delegate)
protected Handshake handshake()
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
public HostnameVerifier getHostnameVerifier()
public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
public SSLSocketFactory getSSLSocketFactory()
public String getCipherSuite()
getCipherSuite in class HttpsURLConnectionpublic Certificate[] getLocalCertificates()
getLocalCertificates in class HttpsURLConnectionpublic Certificate[] getServerCertificates() throws SSLPeerUnverifiedException
getServerCertificates in class HttpsURLConnectionSSLPeerUnverifiedExceptionpublic Principal getPeerPrincipal() throws SSLPeerUnverifiedException
getPeerPrincipal in class HttpsURLConnectionSSLPeerUnverifiedExceptionpublic Principal getLocalPrincipal()
getLocalPrincipal in class HttpsURLConnectionpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic void disconnect()
disconnect in class HttpURLConnectionpublic InputStream getErrorStream()
getErrorStream in class HttpURLConnectionpublic String getRequestMethod()
getRequestMethod in class HttpURLConnectionpublic int getResponseCode()
throws IOException
getResponseCode in class HttpURLConnectionIOExceptionpublic String getResponseMessage() throws IOException
getResponseMessage in class HttpURLConnectionIOExceptionpublic void setRequestMethod(String method) throws ProtocolException
setRequestMethod in class HttpURLConnectionProtocolExceptionpublic boolean usingProxy()
usingProxy in class HttpURLConnectionpublic boolean getInstanceFollowRedirects()
getInstanceFollowRedirects in class HttpURLConnectionpublic void setInstanceFollowRedirects(boolean followRedirects)
setInstanceFollowRedirects in class HttpURLConnectionpublic boolean getAllowUserInteraction()
getAllowUserInteraction in class URLConnectionpublic Object getContent() throws IOException
getContent in class URLConnectionIOExceptionpublic Object getContent(Class[] types) throws IOException
getContent in class URLConnectionIOExceptionpublic String getContentEncoding()
getContentEncoding in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnection@IgnoreJRERequirement public long getContentLengthLong()
getContentLengthLong in class URLConnectionpublic String getContentType()
getContentType in class URLConnectionpublic long getDate()
getDate in class URLConnectionpublic boolean getDefaultUseCaches()
getDefaultUseCaches in class URLConnectionpublic boolean getDoInput()
getDoInput in class URLConnectionpublic boolean getDoOutput()
getDoOutput in class URLConnectionpublic long getExpiration()
getExpiration in class URLConnectionpublic String getHeaderField(int pos)
getHeaderField in class HttpURLConnectionpublic Map<String,List<String>> getHeaderFields()
getHeaderFields in class URLConnectionpublic Map<String,List<String>> getRequestProperties()
getRequestProperties in class URLConnectionpublic void addRequestProperty(String field, String newValue)
addRequestProperty in class URLConnectionpublic String getHeaderField(String key)
getHeaderField in class URLConnection@IgnoreJRERequirement public long getHeaderFieldLong(String field, long defaultValue)
getHeaderFieldLong in class URLConnectionpublic long getHeaderFieldDate(String field, long defaultValue)
getHeaderFieldDate in class HttpURLConnectionpublic int getHeaderFieldInt(String field, int defaultValue)
getHeaderFieldInt in class URLConnectionpublic String getHeaderFieldKey(int position)
getHeaderFieldKey in class HttpURLConnectionpublic long getIfModifiedSince()
getIfModifiedSince in class URLConnectionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic long getLastModified()
getLastModified in class URLConnectionpublic OutputStream getOutputStream() throws IOException
getOutputStream in class URLConnectionIOExceptionpublic Permission getPermission() throws IOException
getPermission in class HttpURLConnectionIOExceptionpublic String getRequestProperty(String field)
getRequestProperty in class URLConnectionpublic URL getURL()
getURL in class URLConnectionpublic boolean getUseCaches()
getUseCaches in class URLConnectionpublic void setAllowUserInteraction(boolean newValue)
setAllowUserInteraction in class URLConnectionpublic void setDefaultUseCaches(boolean newValue)
setDefaultUseCaches in class URLConnectionpublic void setDoInput(boolean newValue)
setDoInput in class URLConnectionpublic void setDoOutput(boolean newValue)
setDoOutput in class URLConnection@IgnoreJRERequirement public void setFixedLengthStreamingMode(long contentLength)
setFixedLengthStreamingMode in class HttpURLConnectionpublic void setIfModifiedSince(long newValue)
setIfModifiedSince in class URLConnectionpublic void setRequestProperty(String field, String newValue)
setRequestProperty in class URLConnectionpublic void setUseCaches(boolean newValue)
setUseCaches in class URLConnectionpublic void setConnectTimeout(int timeoutMillis)
setConnectTimeout in class URLConnectionpublic int getConnectTimeout()
getConnectTimeout in class URLConnectionpublic void setReadTimeout(int timeoutMillis)
setReadTimeout in class URLConnectionpublic int getReadTimeout()
getReadTimeout in class URLConnectionpublic String toString()
toString in class URLConnectionpublic void setFixedLengthStreamingMode(int contentLength)
setFixedLengthStreamingMode in class HttpURLConnectionpublic void setChunkedStreamingMode(int chunkLength)
setChunkedStreamingMode in class HttpURLConnectionCopyright © 2017. All Rights Reserved.