Package com.sun.ts.lib.porting

# Interface TSHttpsURLConnectionInterface

All Known Implementing Classes:
  `TSHttpsURLConnection`

public interface TSHttpsURLConnectionInterface
This is the TSHttpsURLConnectionInterface. An implementation of this interface must be provided by each Java EE implementation, to support https url connection.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `disconnect()`
  Disconnects connection
  `String`
  `getHeaderField(int num)`
  Returns the value for the nth header field.
  `String`
  `getHeaderField(String name)`
  Returns the value of the named header field.
  `InputStream`
  `getInputStream()`
  Returns an input stream that reads from the open connection
  `OutputStream`
  `getOutputStream()`
  Returns an Output stream that writes to the open connection
  `void`
  `init(URL url)`
  Initializes HttpsURLConnection
  `void`
  `setDoInput(boolean doInput)`
  Sets the value of the doInput field for this URLConnection to the specified value.
  `void`
  `setDoOutput(boolean doOutput)`
  Sets the value of the doOutput field for this URLConnection to the specified value.
  `void`
  `setRequestProperty(String key, String value)`
  Sets the general request property.
  `void`
  `setUseCaches(boolean usecaches)`
  Sets the value of the useCaches field of this URLConnection to the specified value.

- ## Method Details

  - ### setDoInput

    void setDoInput(boolean doInput)
    Sets the value of the doInput field for this URLConnection to the specified value. A URL connection can be used for input and/or output. Set the DoInput flag to true if you intend to use the URL connection for input, false if not. The default is true.
    Parameters:
      `doInput` - a boolean indicating whether the URL connection is used for input or not

  - ### setDoOutput

    void setDoOutput(boolean doOutput)
    Sets the value of the doOutput field for this URLConnection to the specified value. A URL connection can be used for input and/or output. Set the DoOutput flag to true if you intend to use the URL connection for output, false if not. The default is false.
    Parameters:
      `doOutput` - a boolean indicating whether the URL connection is used for output or not

  - ### setUseCaches

    void setUseCaches(boolean usecaches)
    Sets the value of the useCaches field of this URLConnection to the specified value. Some protocols do caching of documents. Occasionally, it is important to be able to "tunnel through" and ignore the caches (e.g., the "reload" button in a browser). If the UseCaches flag on a connection is true, the connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value is true
    Parameters:
      `usecaches` - a boolean indicating whether or not to allow caching

  - ### setRequestProperty

    void setRequestProperty(String key, String value)
    Sets the general request property. If a property with the key already exists, overwrite its value with the new value.
    Parameters:
      `key` - the keyword by which the request is known
      `value` - the value associated with it

  - ### getHeaderField

    String getHeaderField(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.
    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

    String getHeaderField(int num)
    Returns the value for the nth header field. It returns null if there are fewer than n fields
    Parameters:
      `num` - Integer num
    Returns:
      String returns the value of the nth header field

  - ### disconnect

    void disconnect()
    Disconnects connection

  - ### getInputStream

    InputStream getInputStream() throws IOException
    Returns an input stream that reads from the open connection
    Returns:
      InputStream inputStream
    Throws:
      `IOException`

  - ### getOutputStream

    OutputStream getOutputStream() throws IOException
    Returns an Output stream that writes to the open connection
    Returns:
      OutputStream - OutputStream
    Throws:
      `IOException`

  - ### init

    void init(URL url) throws IOException
    Initializes HttpsURLConnection
    Parameters:
      `url` - url used to open HttpsURLConnection
    Throws:
      `IOException`