HttpsURLConnection, SOAPHttpURLConnectionpublic class HttpURLConnection
extends java.net.HttpURLConnection
| Modifier and Type | Field | Description |
|---|---|---|
protected static int |
defaultConnectTimeout |
|
protected boolean |
ignoreProxy |
|
protected boolean |
ignoreSystemNonProxyHosts |
|
protected java.io.IOException |
rememberedException |
fixedContentLengthLong, 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| Modifier and Type | Method | Description |
|---|---|---|
void |
addRequestProperty(java.lang.String key,
java.lang.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 java.lang.String |
getAuthInfo(java.lang.String host,
int port,
java.lang.String header) |
|
int |
getConnectTimeout() |
|
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() |
|
static java.lang.String |
getProxyBasicCredentials(java.lang.String proxyHost,
int proxyPort,
java.lang.String authHeader,
java.net.URL requestUrl) |
|
int |
getReadTimeout() |
|
java.util.Map |
getRequestProperties() |
|
java.lang.String |
getRequestProperty(java.lang.String key) |
|
int |
getResponseCode() |
|
static java.lang.String |
getServerBasicCredentials(java.net.URL requestUrl,
java.lang.String authHeader) |
|
javax.net.SocketFactory |
getSocketFactory() |
Gets the
SocketFactory to be used when creating sockets
for http URL connections. |
int |
getTimeout() |
Deprecated.
since 9.0.
|
void |
setChunkedStreamingMode(int chunkLength) |
|
void |
setConnectTimeout(int i) |
|
static void |
setDefaultSocketFactory(javax.net.SocketFactory nuDefaultSF) |
Sets the default SocketFactory to be used when creating sockets for
http URL connections.
|
void |
setEmptyRequestProperty(java.lang.String key) |
|
void |
setFixedLengthStreamingMode(int fixedContentLength) |
|
void |
setIgnoreProxy(boolean v) |
This method will permit the current connection to ignore the system
property http.Proxy or inst Proxy
Note: this method only takes effect calling before the connect() method
|
void |
setIgnoreSystemNonProxyHosts(boolean v) |
This method will permit the current connection ignore the system property http.nonProxyHosts
Note: this method only takes effect calling before the connect() method
|
void |
setMuxableSocket(java.lang.Object socket) |
|
void |
setReadTimeout(int i) |
|
void |
setRequestMethod(java.lang.String method) |
|
void |
setRequestProperty(java.lang.String key,
java.lang.String value) |
|
void |
setSocketFactory(javax.net.SocketFactory fact) |
Sets the
SocketFactory to be used when creating sockets
for http URL connections. |
void |
setTimeout(int i) |
Deprecated.
since 9.0.
|
boolean |
usingProxy() |
|
protected void |
writeRequests() |
getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, getPermission, getRequestMethod, getResponseMessage, setAuthenticator, setFixedLengthStreamingMode, setFollowRedirects, setInstanceFollowRedirectsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldInt, getHeaderFieldLong, getIfModifiedSince, getLastModified, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setUseCaches, toStringprotected static int defaultConnectTimeout
protected java.io.IOException rememberedException
protected boolean ignoreSystemNonProxyHosts
protected boolean ignoreProxy
protected java.lang.String getProtocol()
public final void setSocketFactory(javax.net.SocketFactory fact)
SocketFactory to be used when creating sockets
for http URL connections.public final javax.net.SocketFactory getSocketFactory()
SocketFactory to be used when creating sockets
for http URL connections.public static void setDefaultSocketFactory(javax.net.SocketFactory nuDefaultSF)
nuDefaultSF - SocketFactory to be used as a default SocketFactoryprotected void writeRequests()
throws java.io.IOException
java.io.IOExceptionpublic void setIgnoreSystemNonProxyHosts(boolean v)
v - public void setIgnoreProxy(boolean v)
v - public void connect()
throws java.io.IOException
connect in class java.net.URLConnectionjava.io.IOExceptionprotected weblogic.net.http.HttpClient getHttpClient()
throws java.io.IOException
java.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class java.net.URLConnectionjava.io.IOExceptionprotected static java.lang.String getProxyAuthString()
public static java.lang.String getAuthInfo(java.lang.String host,
int port,
java.lang.String header)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getProxyBasicCredentials(java.lang.String proxyHost,
int proxyPort,
java.lang.String authHeader,
java.net.URL requestUrl)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getServerBasicCredentials(java.net.URL requestUrl,
java.lang.String authHeader)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.URLConnectionjava.io.IOExceptionpublic java.io.InputStream getErrorStream()
getErrorStream in class java.net.HttpURLConnectionprotected boolean followRedirect()
throws java.io.IOException
java.io.IOExceptionpublic void disconnect()
disconnect in class java.net.HttpURLConnectionpublic boolean usingProxy()
usingProxy in class java.net.HttpURLConnectionpublic java.lang.String getHeaderField(java.lang.String name)
getHeaderField in class java.net.URLConnectionname - the name of the header fieldpublic java.lang.String getHeaderField(int n)
getHeaderField in class java.net.HttpURLConnectionn - the index of the header fieldpublic java.util.Map getHeaderFields()
getHeaderFields in class java.net.URLConnectionpublic java.lang.String getHeaderFieldKey(int n)
getHeaderFieldKey in class java.net.HttpURLConnectionn - the index of the header fieldpublic void addRequestProperty(java.lang.String key,
java.lang.String value)
addRequestProperty in class java.net.URLConnectionkey - - request header namevalue - - request header valuepublic java.util.Map getRequestProperties()
getRequestProperties in class java.net.URLConnectionpublic void setRequestProperty(java.lang.String key,
java.lang.String value)
setRequestProperty in class java.net.URLConnectionpublic void setEmptyRequestProperty(java.lang.String key)
public java.lang.String getRequestProperty(java.lang.String key)
getRequestProperty in class java.net.URLConnectionprotected void doSetRequests()
@Deprecated public void setTimeout(int i)
i - in milliseconds@Deprecated public int getTimeout()
public void setReadTimeout(int i)
setReadTimeout in class java.net.URLConnectionpublic int getReadTimeout()
getReadTimeout in class java.net.URLConnectionpublic void setConnectTimeout(int i)
setConnectTimeout in class java.net.URLConnectionpublic int getConnectTimeout()
getConnectTimeout in class java.net.URLConnectionpublic void setFixedLengthStreamingMode(int fixedContentLength)
setFixedLengthStreamingMode in class java.net.HttpURLConnectionpublic void setChunkedStreamingMode(int chunkLength)
setChunkedStreamingMode in class java.net.HttpURLConnectionpublic int getResponseCode()
throws java.io.IOException
getResponseCode in class java.net.HttpURLConnectionjava.io.IOExceptionpublic void setMuxableSocket(java.lang.Object socket)
public void setRequestMethod(java.lang.String method)
throws java.net.ProtocolException
setRequestMethod in class java.net.HttpURLConnectionjava.net.ProtocolException