|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.semanticdesktop.aperture.util.HttpClientUtil
public class HttpClientUtil
Utility methods for clients dealing with HTTP communication.
Constructor Summary | |
---|---|
HttpClientUtil()
|
Method Summary | |
---|---|
static String |
formUrlDecode(String string)
Decodes an url-encoded string. |
static String |
formUrlEncode(String s)
Encodes a string according to RFC 3986 : Uniform Resource locators (URL). |
static String |
formUrlEncode(String string,
String charsToLeave)
Does the same as HttpClientUtil.formUrlEncode (i.e. |
static void |
formUrlEncode(String s,
StringBuilder buffer)
Encodes a string according to RFC 3986 : Uniform Resource locators (URL). |
static InputStream |
getInputStream(URLConnection conn)
Gets the InputStream for reading the response from a server. |
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 buffer)
s
- The String to encode.buffer
- The buffer to store the encoded String in.public static String formUrlEncode(String s)
s
- The String to encode.
public static String formUrlEncode(String string, String charsToLeave)
string
- the string to be encodedcharsToLeave
- a string containing characters that will not be escaped. An example value is "/"
useful for slashes, that are to be left alone in imap folder uris according to RFC 2192
public static String formUrlDecode(String string)
string
- the string to be decoded
public static void setAcceptGZIPEncoding(URLConnection conn)
public static InputStream getInputStream(URLConnection conn) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |