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

## BEA WebLogic Server 9.0 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 HttpURLConnection

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

  Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Field Summary
`static boolean` | `debug`
`protected weblogic.net.http.HttpClient` | `http`
`static String` | `userAgent`

Fields inherited from class java.net.HttpURLConnection
`chunkLength, fixedContentLength, 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(URL u)`

Method Summary
`void` | `addRequestProperty(String key, String value)` Adds a general request property specified by a key-value pair.
`void` | `connect()`
`void` | `disconnect()` Disconnect from the server.
`protected void` | `doSetRequests()`
`protected boolean` | `followRedirect()`
`static String` | `getAuthInfo(String host, int port, String header)`
`int` | `getConnectTimeout()`
`InputStream` | `getErrorStream()`
`String` | `getHeaderField(int n)` Gets a header field by index.
`String` | `getHeaderField(String name)` Gets a header field by name.
`String` | `getHeaderFieldKey(int n)` Gets a header field by index.
`Map` | `getHeaderFields()` Gets all header fields.
`protected weblogic.net.http.HttpClient` | `getHttpClient()`
`InputStream` | `getInputStream()`
`OutputStream` | `getOutputStream()`
`protected String` | `getProtocol()`
`protected static String` | `getProxyAuthString()`
`Map` | `getRequestProperties()`
`String` | `getRequestProperty(String key)`
`int` | `getResponseCode()`
`SocketFactory` | `getSocketFactory()` Gets the `SocketFactory` to be used when creating sockets for http URL connections.
`int` | `getTimeout()`
`void` | `setConnectTimeout(int i)`
`void` | `setEmptyRequestProperty(String key)`
`void` | `setRequestProperty(String key, String value)`
`void` | `setSocketFactory(SocketFactory fact)` Sets the `SocketFactory` to be used when creating sockets for http URL connections.
`void` | `setTimeout(int i)`
`boolean` | `usingProxy()`
`protected void` | `writeRequests()`

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

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

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

Field Detail

### debug

    public static final boolean debug

See Also:
  Constant Field Values

### http

    protected weblogic.net.http.HttpClient http

### userAgent

    public static String userAgent

Constructor Detail

### HttpURLConnection

    public HttpURLConnection(URL u)

Method Detail

### addRequestProperty

    public void addRequestProperty(String key,
                                   String value)

  Adds a general request property specified by a key-value pair. This method will not overwrite existing values associated with the same key.

  Parameters:
    `key` - - request header name
    `value` - - request header value

### connect

    public void connect()
                 throws IOException

  Throws:
    `IOException`

### disconnect

    public void disconnect()

  Disconnect from the server.

### doSetRequests

    protected void doSetRequests()

### followRedirect

    protected boolean followRedirect()
                              throws IOException

  Throws:
    `IOException`

### getAuthInfo

    public static String getAuthInfo(String host,
                                     int port,
                                     String header)
                              throws IOException

  Throws:
    `IOException`

### getConnectTimeout

    public int getConnectTimeout()

### getErrorStream

    public InputStream getErrorStream()

### getHeaderField

    public String getHeaderField(int n)

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

  Parameters:
    `n` - the index of the header field

### getHeaderField

    public String getHeaderField(String name)

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

  Parameters:
    `name` - the name of the header field

### getHeaderFieldKey

    public String getHeaderFieldKey(int n)

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

  Parameters:
    `n` - the index of the header field

### getHeaderFields

    public Map getHeaderFields()

  Gets all header fields.

### getHttpClient

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

  Throws:
    `IOException`

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Throws:
    `IOException`

### getOutputStream

    public OutputStream getOutputStream()
                                 throws IOException

  Throws:
    `IOException`

### getProtocol

    protected String getProtocol()

### getProxyAuthString

    protected static String getProxyAuthString()

### getRequestProperties

    public Map getRequestProperties()

  Returns:
    a Map of the general request properties for this connection.

### getRequestProperty

    public String getRequestProperty(String key)

### getResponseCode

    public int getResponseCode()
                        throws IOException

  Throws:
    `IOException`

### getSocketFactory

    public final SocketFactory getSocketFactory()

  Gets the `SocketFactory` to be used when creating sockets for http URL connections.

### getTimeout

    public int getTimeout()

### setConnectTimeout

    public void setConnectTimeout(int i)

### setEmptyRequestProperty

    public void setEmptyRequestProperty(String key)

### setRequestProperty

    public void setRequestProperty(String key,
                                   String value)

### setSocketFactory

    public final void setSocketFactory(SocketFactory fact)

  Sets the `SocketFactory` to be used when creating sockets for http URL connections.

### setTimeout

    public void setTimeout(int i)

### usingProxy

    public boolean usingProxy()

### writeRequests

    protected void writeRequests()
                          throws IOException

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs90 Copyright 2005 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD