public class HttpClientConnection extends Object implements HttpConnection
HttpConnection which uses HttpClientHTTP_FORBIDDEN, HTTP_NOT_FOUND, HTTP_OK, HTTP_UNAUTHORIZED| Constructor and Description |
|---|
HttpClientConnection(String urlStr) |
HttpClientConnection(String urlStr,
Proxy proxy) |
HttpClientConnection(String urlStr,
Proxy proxy,
org.apache.http.client.HttpClient cl) |
public HttpClientConnection(String urlStr) throws MalformedURLException
urlStr - MalformedURLExceptionpublic HttpClientConnection(String urlStr, Proxy proxy) throws MalformedURLException
urlStr - proxy - MalformedURLExceptionpublic HttpClientConnection(String urlStr, Proxy proxy, org.apache.http.client.HttpClient cl) throws MalformedURLException
urlStr - proxy - cl - MalformedURLExceptionpublic void setBuffer(TemporaryBuffer buffer)
buffer - public int getResponseCode()
throws IOException
getResponseCode in interface HttpConnectionIOExceptionpublic URL getURL()
getURL in interface HttpConnectionpublic String getResponseMessage() throws IOException
getResponseMessage in interface HttpConnectionIOExceptionpublic Map<String,List<String>> getHeaderFields()
getHeaderFields in interface HttpConnectionpublic void setRequestProperty(String name, String value)
setRequestProperty in interface HttpConnectionpublic void setRequestMethod(String method) throws ProtocolException
setRequestMethod in interface HttpConnectionProtocolExceptionpublic void setUseCaches(boolean usecaches)
setUseCaches in interface HttpConnectionpublic void setConnectTimeout(int timeout)
setConnectTimeout in interface HttpConnectionpublic void setReadTimeout(int readTimeout)
setReadTimeout in interface HttpConnectionpublic String getContentType()
getContentType in interface HttpConnectionpublic InputStream getInputStream() throws IOException
getInputStream in interface HttpConnectionIOExceptionpublic String getHeaderField(String name)
getHeaderField in interface HttpConnectionpublic int getContentLength()
getContentLength in interface HttpConnectionpublic void setInstanceFollowRedirects(boolean followRedirects)
setInstanceFollowRedirects in interface HttpConnectionpublic void setDoOutput(boolean dooutput)
setDoOutput in interface HttpConnectionpublic void setFixedLengthStreamingMode(int contentLength)
setFixedLengthStreamingMode in interface HttpConnectionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface HttpConnectionIOExceptionpublic void setChunkedStreamingMode(int chunklen)
setChunkedStreamingMode in interface HttpConnectionpublic String getRequestMethod()
getRequestMethod in interface HttpConnectionpublic boolean usingProxy()
usingProxy in interface HttpConnectionpublic void connect()
throws IOException
connect in interface HttpConnectionIOExceptionpublic void setHostnameVerifier(HostnameVerifier hostnameverifier)
setHostnameVerifier in interface HttpConnectionpublic void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException
configure in interface HttpConnectionKeyManagementExceptionCopyright © 2016 Eclipse JGit Project. All rights reserved.