public class BasicURLHandler extends AbstractURLHandler
URLHandler.URLInfoREQUEST_METHOD_GET, REQUEST_METHOD_HEAD, UNAVAILABLE| Constructor and Description |
|---|
BasicURLHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
download(java.net.URL src,
java.io.File dest,
CopyProgressListener l) |
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 source,
java.net.URL dest,
CopyProgressListener l) |
getContentLength, getContentLength, getDecodingInputStream, getLastModified, getLastModified, getRequestMethod, isReachable, isReachable, normalizeToString, normalizeToURL, setRequestMethod, validatePutStatusCodepublic 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 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 source,
java.net.URL dest,
CopyProgressListener l)
throws java.io.IOException
java.io.IOException