org.sblim.cimclient.internal.http
public class HttpUrlConnection extends HttpURLConnection
Modifier and Type | Field and Description |
---|---|
protected URI |
iUrl |
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
allowUserInteraction, 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, setFollowRedirects, setInstanceFollowRedirects
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldInt, getHeaderFields, getIfModifiedSince, getLastModified, getReadTimeout, getRequestProperties, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setUseCaches
protected 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 URLConnection
public Permission getPermission()
getPermission
in class HttpURLConnection
public void connect() throws IOException
connect
in class URLConnection
IOException
public void setRequestMethod(String pMethod)
setRequestMethod
in class HttpURLConnection
public void setRequestProperty(String key, String value)
setRequestProperty
in class URLConnection
public void disconnect()
disconnect
in class HttpURLConnection
public void close()
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public OutputStream getOutputStream() throws RuntimeException
getOutputStream
in class URLConnection
RuntimeException
public boolean usingProxy()
usingProxy
in class HttpURLConnection
public HttpClient getHttpClient()
public String getHeaderField(String name)
getHeaderField
in class URLConnection
public String getHeaderFieldKey(int index)
getHeaderFieldKey
in class HttpURLConnection
public String getHeaderField(int index)
getHeaderField
in class HttpURLConnection
public String getRequestProperty(String key)
getRequestProperty
in class URLConnection
public String getRequestMethod()
getRequestMethod
in class HttpURLConnection
public void reset()
public int getResponseCode() throws IOException
getResponseCode
in class HttpURLConnection
IOException
public String getResponseMessage()
getResponseMessage
in class HttpURLConnection
public void useHttp11(boolean pUse11)
pUse11
- If true
http 1.1 is enabled.Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.