public class HttpClientHandler extends AbstractURLHandler
| Modifier and Type | Class and Description |
|---|---|
static interface |
HttpClientHandler.HttpClientHelper |
URLHandler.URLInfoREQUEST_METHOD_GET, REQUEST_METHOD_HEAD, UNAVAILABLE| Constructor and Description |
|---|
HttpClientHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
download(java.net.URL src,
java.io.File dest,
CopyProgressListener l) |
int |
getHttpClientMajorVersion() |
URLHandler.URLInfo |
getURLInfo(java.net.URL url)
Returns the URLInfo of the given url or a
URLHandler.UNAVAILABLE instance, if the url is not
reachable. |
URLHandler.URLInfo |
getURLInfo(java.net.URL url,
int timeout)
never returns null, return UNAVAILABLE when url is not reachable
|
java.io.InputStream |
openStream(java.net.URL url) |
void |
upload(java.io.File src,
java.net.URL dest,
CopyProgressListener l) |
getContentLength, getContentLength, getDecodingInputStream, getLastModified, getRequestMethod, getUserAgent, isReachable, isReachable, normalizeToString, normalizeToURL, setRequestMethod, validatePutStatusCodepublic java.io.InputStream openStream(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionpublic void download(java.net.URL src,
java.io.File dest,
CopyProgressListener l)
throws java.io.IOException
java.io.IOExceptionpublic void upload(java.io.File src,
java.net.URL dest,
CopyProgressListener l)
throws java.io.IOException
java.io.IOExceptionpublic URLHandler.URLInfo getURLInfo(java.net.URL url)
URLHandlerURLHandler.UNAVAILABLE instance, if the url is not
reachable.url - The url from which information is retrieved.URLHandler.UNAVAILABLE when the url is not
available.public URLHandler.URLInfo getURLInfo(java.net.URL url, int timeout)
URLHandlerurl - The url from which information is retrieved.timeout - The timeout in milliseconds.URLHandler.UNAVAILABLE when the url is not
available.public int getHttpClientMajorVersion()