com.sun.net.ssl
Class HttpsURLConnection
java.lang.Object
|
+--java.net.URLConnection
|
+--java.net.HttpURLConnection
|
+--com.sun.net.ssl.HttpsURLConnection
- public abstract class HttpsURLConnection
- extends HttpURLConnection
HTTP URL connection with support for HTTPS-specific features. See
the spec for
details.
Fields inherited from class java.net.HttpURLConnection |
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_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,
method,
responseCode,
responseMessage |
Methods inherited from class java.net.URLConnection |
connect,
getAllowUserInteraction,
getContent,
getContentEncoding,
getContentLength,
getContentType,
getDate,
getDefaultAllowUserInteraction,
getDefaultRequestProperty,
getDefaultUseCaches,
getDoInput,
getDoOutput,
getExpiration,
getFileNameMap,
getHeaderField,
getHeaderField,
getHeaderFieldDate,
getHeaderFieldInt,
getHeaderFieldKey,
getIfModifiedSince,
getInputStream,
getLastModified,
getOutputStream,
getRequestProperty,
getURL,
getUseCaches,
guessContentTypeFromName,
guessContentTypeFromStream,
setAllowUserInteraction,
setContentHandlerFactory,
setDefaultAllowUserInteraction,
setDefaultRequestProperty,
setDefaultUseCaches,
setDoInput,
setDoOutput,
setFileNameMap,
setIfModifiedSince,
setRequestProperty,
setUseCaches,
toString |
hostnameVerifier
protected HostnameVerifier hostnameVerifier
sslSocketFactory
protected SSLSocketFactory sslSocketFactory
HttpsURLConnection
public HttpsURLConnection(URL url)
throws IOException
getCipherSuite
public abstract String getCipherSuite()
- Returns the cipher suite in use on this connection.
- Returns:
- the cipher suite
- Throws:
- IllegalStateException - if this method is called before
the connection has been established.
getServerCertificateChain
public abstract X509Certificate[] getServerCertificateChain()
- Returns the server's X.509 certificate chain, or null if
the server did not authenticate.
- Returns:
- the server certificate chain
- Throws:
- IllegalStateException - if this method is called before
the connection has been established.
setDefaultHostnameVerifier
public static void setDefaultHostnameVerifier(HostnameVerifier v)
- Sets the default HostnameVerifier inherited when an instance
of this class is created.
- Parameters:
v
- the default host name verifier- Throws:
- IllegalArgumentException - if the HostnameVerifier
parameter is null.
getDefaultHostnameVerifier
public static HostnameVerifier getDefaultHostnameVerifier()
- Gets the default HostnameVerifier.
- Returns:
- the default host name verifier
setHostnameVerifier
public void setHostnameVerifier(HostnameVerifier v)
- Sets the HostnameVerifier.
- Parameters:
v
- the host name verifier- Throws:
- IllegalArgumentException - if the HostnameVerifier
parameter is null.
getHostnameVerifier
public HostnameVerifier getHostnameVerifier()
- Gets the HostnameVerifier.
- Returns:
- the host name verifier
setDefaultSSLSocketFactory
public static void setDefaultSSLSocketFactory(SSLSocketFactory sf)
- Sets the default SSL socket factory inherited when an instance
of this class is created.
- Parameters:
sf
- the default SSL socket factory- Throws:
- IllegalArgumentException - if the SSLSocketFactory
parameter is null.
getDefaultSSLSocketFactory
public static SSLSocketFactory getDefaultSSLSocketFactory()
- Gets the default SSL socket factory.
- Returns:
- the default SSL socket factory
setSSLSocketFactory
public void setSSLSocketFactory(SSLSocketFactory sf)
- Sets the SSL socket factory.
- Parameters:
sf
- the SSL socket factory- Throws:
- IllegalArgumentException - if the SSLSocketFactory
parameter is null.
getSSLSocketFactory
public SSLSocketFactory getSSLSocketFactory()
- Gets the SSL socket factory.
- Returns:
- the SSL socket factory