public class HttpClientHandler extends AbstractURLHandler
Modifier and Type | Class and Description |
---|---|
static interface |
HttpClientHandler.HttpClientHelper |
URLHandler.URLInfo
REQUEST_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, getLastModified, getRequestMethod, getUserAgent, isReachable, isReachable, normalizeToString, normalizeToURL, setRequestMethod, validatePutStatusCode
public java.io.InputStream openStream(java.net.URL url) throws java.io.IOException
java.io.IOException
public void download(java.net.URL src, java.io.File dest, CopyProgressListener l) throws java.io.IOException
java.io.IOException
public void upload(java.io.File src, java.net.URL dest, CopyProgressListener l) throws java.io.IOException
java.io.IOException
public URLHandler.URLInfo getURLInfo(java.net.URL url)
URLHandler
URLHandler.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)
URLHandler
url
- The url from which information is retrieved.timeout
- The timeout in milliseconds.URLHandler.UNAVAILABLE
when the url is not
available.public int getHttpClientMajorVersion()