public class HttpUrlConnection extends HttpURLConnection
| Modifier and Type | Field and Description |
|---|---|
protected URI |
iUrl |
chunkLength, fixedContentLength, 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, responseMessageallowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Constructor and Description |
|---|
HttpUrlConnection(URI pUri,
HttpClientPool pHttpClientPool,
AuthorizationHandler pAuthHandler)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the client pool
|
void |
connect() |
void |
disconnect() |
String |
getHeaderField(int index) |
String |
getHeaderField(String name) |
String |
getHeaderFieldKey(int index) |
HttpClient |
getHttpClient()
Returns the http client
|
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
Permission |
getPermission() |
String |
getRequestMethod() |
String |
getRequestProperty(String key) |
int |
getResponseCode() |
String |
getResponseMessage() |
void |
reset()
Resets the http client
|
void |
setRequestMethod(String pMethod) |
void |
setRequestProperty(String key,
String value) |
String |
toString() |
void |
useHttp11(boolean pUse11)
Enables/Disables the use of http 1.1
|
boolean |
usingProxy() |
getErrorStream, getFollowRedirects, getHeaderFieldDate, getInstanceFollowRedirects, setChunkedStreamingMode, setFixedLengthStreamingMode, setFixedLengthStreamingMode, setFollowRedirects, setInstanceFollowRedirectsaddRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldInt, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getReadTimeout, getRequestProperties, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setUseCachesprotected URI iUrl
public HttpUrlConnection(URI pUri, HttpClientPool pHttpClientPool, AuthorizationHandler pAuthHandler)
pUri - The host URIpHttpClientPool - The client poolpAuthHandler - The authentication handlerpublic String toString()
toString in class URLConnectionpublic Permission getPermission()
getPermission in class HttpURLConnectionpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic void setRequestMethod(String pMethod)
setRequestMethod in class HttpURLConnectionpublic void setRequestProperty(String key, String value)
setRequestProperty in class URLConnectionpublic void disconnect()
disconnect in class HttpURLConnectionpublic void close()
public InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic OutputStream getOutputStream() throws RuntimeException
getOutputStream in class URLConnectionRuntimeExceptionpublic boolean usingProxy()
usingProxy in class HttpURLConnectionpublic HttpClient getHttpClient()
public String getHeaderField(String name)
getHeaderField in class URLConnectionpublic String getHeaderFieldKey(int index)
getHeaderFieldKey in class HttpURLConnectionpublic String getHeaderField(int index)
getHeaderField in class HttpURLConnectionpublic String getRequestProperty(String key)
getRequestProperty in class URLConnectionpublic String getRequestMethod()
getRequestMethod in class HttpURLConnectionpublic void reset()
public int getResponseCode()
throws IOException
getResponseCode in class HttpURLConnectionIOExceptionpublic String getResponseMessage()
getResponseMessage in class HttpURLConnectionpublic void useHttp11(boolean pUse11)
pUse11 - If true http 1.1 is enabled.Copyright © 2005, 2012 IBM Corporation. All Rights Reserved.