|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.net.http.HttpClientUtil
public class HttpClientUtil
| Constructor Summary | |
|---|---|
HttpClientUtil()
|
|
| Method Summary | |
|---|---|
static String |
appendParameter(String url,
String parameterName,
String parameterValue)
Append a properly encoded parameter to the query string of the specified URL. |
static String |
encodeParameter(String parameterName,
String parameterValue)
Encode a parameter for use in a URL. |
static String |
formUrlEncode(String s)
Encodes a string according to RFC 1738 : Uniform Resource locators (URL). |
static void |
formUrlEncode(String s,
StringBuilder buf)
Encodes a string according to RFC 1738 : Uniform Resource locators (URL). |
static InputStream |
getInputStream(URLConnection conn)
Gets the InputStream for reading the response from a server. |
static boolean |
is2xx(int statusCode)
Checks whether the specified status code is in the 2xx-range, indicating a successfull request. |
static void |
setAcceptGZIPEncoding(URLConnection conn)
Sets a request property on the supplied connection indicating that a server can respond with gzip-encoded data if it wants to. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpClientUtil()
| Method Detail |
|---|
public static void formUrlEncode(String s,
StringBuilder buf)
public static String formUrlEncode(String s)
public static final String appendParameter(String url,
String parameterName,
String parameterValue)
url - the URL to append toparameterName - the name of parameter to appendparameterValue - the value to append
public static String encodeParameter(String parameterName,
String parameterValue)
parameterName - the name of the parameterparameterValue - the value
public static void setAcceptGZIPEncoding(URLConnection conn)
public static InputStream getInputStream(URLConnection conn)
throws IOException
IOExceptionpublic static boolean is2xx(int statusCode)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||