com.sun.ts.lib.porting
Class TSHttpsURLConnection

java.lang.Object
  extended by com.sun.ts.lib.porting.TSHttpsURLConnection
All Implemented Interfaces:
TSHttpsURLConnectionInterface

public class TSHttpsURLConnection
extends java.lang.Object
implements TSHttpsURLConnectionInterface

TSHttpsURLConnection provides the HTTPS specific featurs


Constructor Summary
TSHttpsURLConnection()
          Instantiates the class defined in porting.ts.HttpsURLConnection.class.1
TSHttpsURLConnection(java.lang.String sClass)
          Instantiates the class defined by sClass
 
Method Summary
 void disconnect()
          Disconnect connection
 java.lang.String getHeaderField(int num)
          Returns the value for the nth header field.
 java.lang.String getHeaderField(java.lang.String name)
          Returns the value of the named header field.
 java.io.InputStream getInputStream()
          Returns an input stream that reads from the open connection
 java.io.OutputStream getOutputStream()
          Returns an Output stream that writes to the open connection
 void init(java.net.URL url)
          Initializes HttpsURLConnection
 void setDoInput(boolean doInput)
          Sets the value of the doInput field for this Connection
 void setDoOutput(boolean doOutput)
          Sets the value of the doOutput field for this Connection
 void setRequestProperty(java.lang.String key, java.lang.String value)
          Sets the general request property.
 void setUseCaches(boolean usecaches)
          Sets the value of the useCaches field for this Connection If the UseCaches flag on the connection is true, the connection is allowed to use whatever caches it can.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TSHttpsURLConnection

public TSHttpsURLConnection()
Instantiates the class defined in porting.ts.HttpsURLConnection.class.1


TSHttpsURLConnection

public TSHttpsURLConnection(java.lang.String sClass)
Instantiates the class defined by sClass

Parameters:
sClass - - this class is used to instantiate implementation specific HttpsURLConnection class
Method Detail

setDoInput

public void setDoInput(boolean doInput)
Sets the value of the doInput field for this Connection

Specified by:
setDoInput in interface TSHttpsURLConnectionInterface
Parameters:
doInput - - the new value (the default is false)

setDoOutput

public void setDoOutput(boolean doOutput)
Sets the value of the doOutput field for this Connection

Specified by:
setDoOutput in interface TSHttpsURLConnectionInterface
Parameters:
doOutput - - the new value (the default is false)

setUseCaches

public void setUseCaches(boolean usecaches)
Sets the value of the useCaches field for this Connection If the UseCaches flag on the connection is true, the connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value is set to true

Specified by:
setUseCaches in interface TSHttpsURLConnectionInterface
Parameters:
usecaches - - the new value (the default is true)

setRequestProperty

public void setRequestProperty(java.lang.String key,
                               java.lang.String value)
Sets the general request property. If a property with the key already exists, overwrite its value with the new value.

Specified by:
setRequestProperty in interface TSHttpsURLConnectionInterface
Parameters:
key - - the keyword by which the request is known
value - - the value associated with it

getHeaderField

public java.lang.String getHeaderField(java.lang.String name)
Returns the value of the named header field. If called on a connection that sets the same header multiple times only the last value is returned.

Specified by:
getHeaderField in interface TSHttpsURLConnectionInterface
Parameters:
name - - the name of the header field.
Returns:
String - the value of the named header field, or null if there is no such field in the header.

getHeaderField

public java.lang.String getHeaderField(int num)
Returns the value for the nth header field. It returns null if there are fewer than n fields

Specified by:
getHeaderField in interface TSHttpsURLConnectionInterface
Parameters:
num - - Integer num
Returns:
String - returns the value of the nth header field

disconnect

public void disconnect()
Disconnect connection

Specified by:
disconnect in interface TSHttpsURLConnectionInterface

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream that reads from the open connection

Specified by:
getInputStream in interface TSHttpsURLConnectionInterface
Returns:
InputStream - inputStream
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns an Output stream that writes to the open connection

Specified by:
getOutputStream in interface TSHttpsURLConnectionInterface
Returns:
OutputStream - outputStream
Throws:
java.io.IOException

init

public void init(java.net.URL url)
          throws java.io.IOException
Initializes HttpsURLConnection

Specified by:
init in interface TSHttpsURLConnectionInterface
Parameters:
url - url used to open HttpsURLConnection
Throws:
java.io.IOException