Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 8.1 API Reference

## weblogic.net.http
Class HttpURLConnection

    java.lang.Object
      |
      +--java.net.URLConnection
            |
            +--java.net.HttpURLConnection
                  |
                  +--weblogic.net.http.HttpURLConnection

Direct Known Subclasses:
  HttpsURLConnection, SOAPHttpURLConnection

public class HttpURLConnection
extends java.net.HttpURLConnection

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

Author:
  Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Field Summary
`protected ContentLengthOutputStream` | `clenOS`
`static boolean` | `debug`
`protected static int` | `defaultConnectTimeout`
`protected static int` | `defaultReadTimeout`
`protected weblogic.net.http.HttpClient` | `http`
`protected java.io.InputStream` | `inputStream`
`protected int` | `instanceConnectTimeout`
`protected int` | `instanceReadTimeout`
`protected weblogic.utils.io.UnsyncByteArrayOutputStream` | `poster`
`protected HttpOutputStream` | `ps`
`protected weblogic.net.http.MessageHeader` | `requests`
`protected weblogic.net.http.MessageHeader` | `responses`
`protected boolean` | `setRequests`
`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_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, responseMessage`

Fields inherited from class java.net.URLConnection
`allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches`

Constructor Summary
`HttpURLConnection(java.net.URL u)`

Method Summary
`void` | `connect()`
`void` | `disconnect()` Disconnect from the server.
`protected void` | `doSetRequests()`
`protected boolean` | `followRedirect()`
`static java.lang.String` | `getAuthInfo(java.lang.String host, int port, java.lang.String header)`
`int` | `getConnectTimeout()` Gets the Connection timeout in milliseconds.
`java.io.InputStream` | `getErrorStream()`
`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.util.Map` | `getHeaderFields()` Gets all header fields.
`protected weblogic.net.http.HttpClient` | `getHttpClient()`
`java.io.InputStream` | `getInputStream()`
`java.io.OutputStream` | `getOutputStream()`
`protected java.lang.String` | `getProtocol()`
`protected static java.lang.String` | `getProxyAuthString()`
`int` | `getReadTimeout()` Gets the Read Time out on the underlying socket specified in milliseconds.
`java.lang.String` | `getRequestProperty(java.lang.String key)`
`int` | `getResponseCode()`
`int` | `getTimeout()` Deprecated. it is replace with setReadTimeout.
`void` | `setConnectTimeout(int timeout)` Sets the Connection timeout in milliseconds, this timeout is used while opening a new socket connection to the specified URL.
`void` | `setEmptyRequestProperty(java.lang.String key)`
`void` | `setReadTimeout(int i)` Sets the Read Time out on the underlying socket specified in milliseconds.
`void` | `setRequestProperty(java.lang.String key, java.lang.String value)`
`void` | `setTimeout(int i)` Deprecated. it is replace with setReadTimeout.
`boolean` | `usingProxy()`
`protected void` | `writeRequests()`

Methods inherited from class java.net.HttpURLConnection
`getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, getPermission, getRequestMethod, getResponseMessage, setFollowRedirects, setInstanceFollowRedirects, setRequestMethod`

Methods inherited from class java.net.URLConnection
`addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldInt, getIfModifiedSince, getLastModified, getRequestProperties, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setUseCaches, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### userAgent

    public static java.lang.String userAgent

### defaultReadTimeout

    protected static int defaultReadTimeout

### instanceReadTimeout

    protected int instanceReadTimeout

### defaultConnectTimeout

    protected static int defaultConnectTimeout

### instanceConnectTimeout

    protected int instanceConnectTimeout

### debug

    public static final boolean debug

### http

    protected weblogic.net.http.HttpClient http

### ps

    protected HttpOutputStream ps

### requests

    protected weblogic.net.http.MessageHeader requests

### responses

    protected weblogic.net.http.MessageHeader responses

### inputStream

    protected java.io.InputStream inputStream

### clenOS

    protected ContentLengthOutputStream clenOS

### poster

    protected weblogic.utils.io.UnsyncByteArrayOutputStream poster

### setRequests

    protected boolean setRequests

Constructor Detail

### HttpURLConnection

    public HttpURLConnection(java.net.URL u)

Method Detail

### getProtocol

    protected java.lang.String getProtocol()

### writeRequests

    protected void writeRequests()
                          throws java.io.IOException

### connect

    public void connect()
                 throws java.io.IOException

  Overrides:
    connect in class java.net.URLConnection

### getHttpClient

    protected weblogic.net.http.HttpClient getHttpClient()
                                throws java.io.IOException

### getOutputStream

    public java.io.OutputStream getOutputStream()
                                         throws java.io.IOException

  Overrides:
    getOutputStream in class java.net.URLConnection

### getProxyAuthString

    protected static java.lang.String getProxyAuthString()

### getAuthInfo

    public static java.lang.String getAuthInfo(java.lang.String host,
                                               int port,
                                               java.lang.String header)
                                        throws java.io.IOException

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Overrides:
    getInputStream in class java.net.URLConnection

### getErrorStream

    public java.io.InputStream getErrorStream()

  Overrides:
    getErrorStream in class java.net.HttpURLConnection

### followRedirect

    protected boolean followRedirect()
                              throws java.io.IOException

### 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.

  Parameters:
    `name` - the name of the header field
  Overrides:
    getHeaderField in class java.net.URLConnection

### getHeaderFields

    public java.util.Map getHeaderFields()

  Gets all header fields.

  Overrides:
    getHeaderFields in class java.net.URLConnection

### getHeaderField

    public java.lang.String getHeaderField(int n)

  Gets a header field by index. Returns null if not known.

  Parameters:
    `n` - the index of the header field
  Overrides:
    getHeaderField in class java.net.HttpURLConnection

### getHeaderFieldKey

    public java.lang.String getHeaderFieldKey(int n)

  Gets a header field by index. Returns null if not known.

  Parameters:
    `n` - the index of the header field
  Overrides:
    getHeaderFieldKey in class java.net.HttpURLConnection

### setRequestProperty

    public void setRequestProperty(java.lang.String key,
                                   java.lang.String value)

  Overrides:
    setRequestProperty in class java.net.URLConnection

### setEmptyRequestProperty

    public void setEmptyRequestProperty(java.lang.String key)

### getRequestProperty

    public java.lang.String getRequestProperty(java.lang.String key)

  Overrides:
    getRequestProperty in class java.net.URLConnection

### doSetRequests

    protected void doSetRequests()

### setReadTimeout

    public void setReadTimeout(int i)

  Sets the Read Time out on the underlying socket specified in milliseconds.

  See Also:
    `getReadTimeout()`

### getReadTimeout

    public int getReadTimeout()

  Gets the Read Time out on the underlying socket specified in milliseconds.

  See Also:
    `setReadTimeout(int)`

### setConnectTimeout

    public void setConnectTimeout(int timeout)

  Sets the Connection timeout in milliseconds, this timeout is used while opening a new socket connection to the specified URL. The value -1 means infinite connection time.

  Parameters:
    `timeout` - an int that define the connection timeout in milliseconds, -1 means infinity.
  See Also:
    `getConnectTimeout()`

### getConnectTimeout

    public int getConnectTimeout()

  Gets the Connection timeout in milliseconds.

  Returns:
    an int that returns the connection timeout in milliseconds.
  See Also:
    `setConnectTimeout(int)`

### setTimeout

    public void setTimeout(int i)

  Deprecated. it is replace with setReadTimeout.
  Sets the Read Time out on the underlying socket specified in milliseconds.

  See Also:
    `setReadTimeout(int)`

### getTimeout

    public int getTimeout()

  Deprecated. it is replace with setReadTimeout.
  Gets the Read Time out on the underlying socket specified in milliseconds.

  See Also:
    `getReadTimeout()`

### getResponseCode

    public int getResponseCode()
                        throws java.io.IOException

  Overrides:
    getResponseCode in class java.net.HttpURLConnection

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs81
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD