|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.util.HttpSupport
public class HttpSupport
Extra utilities to support usage of HTTP.
| Method Summary | |
|---|---|
static void |
encode(java.lang.StringBuilder urlstr,
java.lang.String key)
URL encode a value string into an output buffer. |
static java.net.Proxy |
proxyFor(java.net.ProxySelector proxySelector,
java.net.URL u)
Determine the proxy server (if any) needed to obtain a URL. |
static int |
response(java.net.HttpURLConnection c)
Get the HTTP response code from the request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void encode(java.lang.StringBuilder urlstr,
java.lang.String key)
urlstr - the output buffer.key - value which must be encoded to protected special characters.
public static int response(java.net.HttpURLConnection c)
throws java.io.IOException
Roughly the same as c.getResponseCode() but the
ConnectException is translated to be more understandable.
c - connection the code should be obtained from.
HttpURLConnection for other defined constants.
java.io.IOException - communications error prevented obtaining the response code.
public static java.net.Proxy proxyFor(java.net.ProxySelector proxySelector,
java.net.URL u)
throws java.net.ConnectException
proxySelector - proxy support for the caller.u - location of the server caller wants to talk to.
java.net.ConnectException - the proxy could not be computed as the supplied URL could not
be read. This failure should never occur.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||