|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwt.HTTP
This object encapsulates a *single* HTTP connection. Multiple requests may be pipelined over a connection (thread-safe), although any IOException encountered in a request will invalidate all later requests.
Nested Class Summary | |
class |
HTTP.HTTPInputStream
An input stream that represents a subset of a longer input stream. |
static class |
HTTP.Proxy
encapsulates most of the proxy logic; some is shared in HTTP.java |
Constructor Summary | |
HTTP(java.lang.String url)
|
|
HTTP(java.lang.String url,
boolean skipResolveCheck)
|
Method Summary | |
java.net.Socket |
attemptDirect()
Attempts a direct connection |
java.net.Socket |
attemptHttpProxy(java.lang.String proxyHost,
int proxyPort)
Attempts to use an HTTP proxy, employing the CONNECT method if HTTPS is requested |
java.net.Socket |
attemptPAC(JS.Callable pacFunc)
executes the PAC script and dispatches a call to one of the other attempt methods based on the result |
java.net.Socket |
attemptSocksProxy(java.lang.String proxyHost,
int proxyPort)
Implements SOCKSv4 with v4a DNS extension |
java.io.InputStream |
GET()
Performs an HTTP GET request |
java.io.InputStream |
POST(java.lang.String contentType,
java.lang.String content)
Performs an HTTP POST request; content is appended to the headers (so it should include a blank line to delimit the beginning of the body) |
void |
sendRequest(java.lang.String contentType,
java.lang.String content)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HTTP(java.lang.String url)
public HTTP(java.lang.String url, boolean skipResolveCheck)
Method Detail |
public java.io.InputStream GET() throws java.io.IOException
java.io.IOException
public java.io.InputStream POST(java.lang.String contentType, java.lang.String content) throws java.io.IOException
java.io.IOException
public java.net.Socket attemptDirect()
public java.net.Socket attemptHttpProxy(java.lang.String proxyHost, int proxyPort)
public java.net.Socket attemptSocksProxy(java.lang.String proxyHost, int proxyPort)
http://www.socks.nec.com/protocol/socks4.protocol
,
http://www.socks.nec.com/protocol/socks4a.protocol
public java.net.Socket attemptPAC(JS.Callable pacFunc)
public void sendRequest(java.lang.String contentType, java.lang.String content) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |