org.apache.ivy.util.url
public interface URLHandler
Nested Class Summary | |
---|---|
static class | URLHandler.URLInfo |
Field Summary | |
---|---|
static int | REQUEST_METHOD_GET
Using the slower REQUEST method for getting the basic URL infos. |
static int | REQUEST_METHOD_HEAD
Using the faster HEAD method for getting the basic URL infos. |
static URLHandler.URLInfo | UNAVAILABLE |
Method Summary | |
---|---|
void | download(URL src, File dest, CopyProgressListener l) |
long | getContentLength(URL url)
Returns the length of the target if the given url is reachable, and without error code in
case of http urls. |
long | getContentLength(URL url, int timeout)
Returns the length of the target if the given url is reachable, and without error code in
case of http urls.
|
long | getLastModified(URL url)
Please prefer getURLInfo when several infos are needed.
|
long | getLastModified(URL url, int timeout)
Please prefer getURLInfo when several infos are needed.
|
URLHandler.URLInfo | getURLInfo(URL url)
Returns the URLInfo of the given url or a UNAVAILABLE instance,
if the url is not reachable.
|
URLHandler.URLInfo | getURLInfo(URL url, int timeout)
never returns null, return UNAVAILABLE when url is not reachable
|
boolean | isReachable(URL url)
Please prefer getURLInfo when several infos are needed.
|
boolean | isReachable(URL url, int timeout)
Please prefer getURLInfo when several infos are needed.
|
InputStream | openStream(URL url) |
void | setRequestMethod(int requestMethod) |
void | upload(File src, URL dest, CopyProgressListener l) |
Parameters: url the url to check
Returns: the length of the target if available, 0 if not reachable
Parameters: url the url to check timeout the maximum time before considering an url is not reachable a timeout of zero indicates no timeout
Returns: the length of the target if available, 0 if not reachable
Parameters: url the url to check
Returns: last modified timestamp of the given url
Parameters: url the url to check
Returns: last modified timestamp of the given url
Parameters: url The url from which information is retrieved.
Returns: The URLInfo extracted from the given url, or UNAVAILABLE when the url is not available.
Parameters: url The url from which information is retrieved. timeout The timeout in milliseconds.
Returns: The URLInfo extracted from the given url, or UNAVAILABLE when the url is not available.
Parameters: url the url to check
Returns: true if the target is reachable
Parameters: url the url to check
Returns: true if the target is reachable