com.ibm.net.ssl.internal.www.protocol.https
Class HttpsURLConnection

java.lang.Object
  |
  +--java.net.URLConnection
        |
        +--java.net.HttpURLConnection
              |
              +--com.ibm.net.ssl.HttpsURLConnection
                    |
                    +--com.ibm.net.ssl.internal.www.protocol.https.HttpsURLConnection

public class HttpsURLConnection
extends HttpsURLConnection

A class to represent an HTTP connection to a remote object.


Field Summary
static java.lang.String userAgent
           
 
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 Summary
 void connect()
          Implements the HTTP protocol handler's "connect" method, establishing an SSL connection to the server as necessary.
 void disconnect()
          Disconnect from the server.
 void finalize()
           
 java.lang.String getCipherSuite()
          Returns the cipher suite in use on this connection.
 java.lang.String getHeaderField(int n)
          Gets a header field by index.
 java.lang.String getHeaderField(java.lang.String name)
          Gets a header field by name.
 java.lang.String getHeaderFieldKey(int n)
          Gets a header field by index.
 java.io.InputStream getInputStream()
           
 boolean getInstanceFollowRedirects()
           
 java.io.OutputStream getOutputStream()
           
 java.lang.String getRequestProperty(java.lang.String key)
           
 X509Certificate[] getServerCertificateChain()
          Returns the server's X.509 certificate chain, or null if the server did not authenticate.
static void setDefaultAuthenticator(HttpAuthenticator a)
          Use java.net.Authenticator.setDefault() instead.
 void setInstanceFollowRedirects(boolean shouldFollow)
           
 void setRequestProperty(java.lang.String key, java.lang.String value)
          Sets request property.
 boolean usingProxy()
           
 
Methods inherited from class com.ibm.net.ssl.HttpsURLConnection
getDefaultSSLSocketFactory, getSSLSocketFactory, setDefaultSSLSocketFactory, setSSLSocketFactory
 
Methods inherited from class java.net.HttpURLConnection
getErrorStream, getFollowRedirects, getPermission, getRequestMethod, getResponseCode, getResponseMessage, setFollowRedirects, setRequestMethod
 
Methods inherited from class java.net.URLConnection
getAllowUserInteraction, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldDate, getHeaderFieldInt, getIfModifiedSince, getLastModified, getURL, getUseCaches, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setUseCaches, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

userAgent

public static final java.lang.String userAgent
Method Detail

setDefaultAuthenticator

public static void setDefaultAuthenticator(HttpAuthenticator a)
Use java.net.Authenticator.setDefault() instead.

connect

public void connect()
             throws java.io.IOException
Implements the HTTP protocol handler's "connect" method, establishing an SSL connection to the server as necessary.
Overrides:
connect in class java.net.URLConnection

getCipherSuite

public java.lang.String getCipherSuite()
Returns the cipher suite in use on this connection.
Overrides:
getCipherSuite in class HttpsURLConnection

getServerCertificateChain

public X509Certificate[] getServerCertificateChain()
Returns the server's X.509 certificate chain, or null if the server did not authenticate.
Overrides:
getServerCertificateChain in class HttpsURLConnection

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Overrides:
getOutputStream in class java.net.URLConnection

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class java.net.URLConnection

disconnect

public void disconnect()
Disconnect from the server.
Overrides:
disconnect in class java.net.HttpURLConnection

usingProxy

public boolean usingProxy()
Overrides:
usingProxy in class java.net.HttpURLConnection

getHeaderField

public java.lang.String getHeaderField(java.lang.String name)
Gets a header field by name. Returns null if not known.
Overrides:
getHeaderField in class java.net.URLConnection
Parameters:
name - the name of the header field

getHeaderField

public java.lang.String getHeaderField(int n)
Gets a header field by index. Returns null if not known.
Overrides:
getHeaderField in class java.net.URLConnection
Parameters:
n - the index of the header field

getHeaderFieldKey

public java.lang.String getHeaderFieldKey(int n)
Gets a header field by index. Returns null if not known.
Overrides:
getHeaderFieldKey in class java.net.URLConnection
Parameters:
n - the index of the header field

setRequestProperty

public void setRequestProperty(java.lang.String key,
                               java.lang.String value)
Sets request property. If a property with the key already exists, overwrite its value with the new value.
Overrides:
setRequestProperty in class java.net.URLConnection
Parameters:
value - the value to be set

getRequestProperty

public java.lang.String getRequestProperty(java.lang.String key)
Overrides:
getRequestProperty in class java.net.URLConnection

finalize

public void finalize()

setInstanceFollowRedirects

public void setInstanceFollowRedirects(boolean shouldFollow)

getInstanceFollowRedirects

public boolean getInstanceFollowRedirects()