|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HTTPUtil
Field Summary | |
---|---|
static short |
ACTION_GET
Field ACTION_GET |
static short |
ACTION_POST
Field ACTION_POST |
static int |
STATUS_OK
Field STATUS_OK |
Method Summary | |
---|---|
String |
decode(String str,
String charset)
translate a url encoded string to a regular string |
HTTPResponse |
delete(URL url,
String username,
String password,
int timeout,
String charset,
String useragent,
String proxyserver,
int proxyport,
String proxyuser,
String proxypassword,
Header[] headers)
|
String |
encode(String str,
String charset)
translate a string in the URLEncoded Format |
HTTPResponse |
get(URL url,
String username,
String password,
int timeout,
String charset,
String useragent,
String proxyserver,
int proxyport,
String proxyuser,
String proxypassword,
Header[] headers)
make a http requst to given url |
HTTPResponse |
head(URL url,
String username,
String password,
int timeout,
String charset,
String useragent,
String proxyserver,
int proxyport,
String proxyuser,
String proxypassword,
Header[] headers)
|
HTTPResponse |
put(URL url,
String username,
String password,
int timeout,
String charset,
String useragent,
String proxyserver,
int proxyport,
String proxyuser,
String proxypassword,
Header[] headers,
Object body)
|
URI |
toURI(String strUrl)
|
URI |
toURI(String strUrl,
int port)
|
URL |
toURL(String strUrl)
cast a string to a url |
URL |
toURL(String strUrl,
int port)
cast a string to a url |
Field Detail |
---|
static final short ACTION_POST
ACTION_POST
static final short ACTION_GET
ACTION_GET
static final int STATUS_OK
STATUS_OK
Method Detail |
---|
HTTPResponse get(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, Header[] headers) throws IOException
url
- username
- password
- timeout
- charset
- useragent
- proxyserver
- proxyport
- proxyuser
- proxypassword
-
IOException
HTTPResponse put(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, Header[] headers, Object body) throws IOException
IOException
HTTPResponse delete(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, Header[] headers) throws IOException
IOException
HTTPResponse head(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, Header[] headers) throws IOException
IOException
URL toURL(String strUrl, int port) throws MalformedURLException
strUrl
- string represent a url
MalformedURLException
URL toURL(String strUrl) throws MalformedURLException
strUrl
- string represent a url
MalformedURLException
URI toURI(String strUrl) throws URISyntaxException
URISyntaxException
URI toURI(String strUrl, int port) throws URISyntaxException
URISyntaxException
String encode(String str, String charset) throws UnsupportedEncodingException
str
- String to translatecharset
- charset used for translation
UnsupportedEncodingException
String decode(String str, String charset) throws UnsupportedEncodingException
str
- encoded stringcharset
- charset used
UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |