TimeoutConstrainedURLHandler
is preferred in favour of this interface@Deprecated
public interface URLHandler
Modifier and Type | Interface and Description |
---|---|
static class |
URLHandler.URLInfo
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static int |
REQUEST_METHOD_GET
Deprecated.
Using the slower REQUEST method for getting the basic URL infos.
|
static int |
REQUEST_METHOD_HEAD
Deprecated.
Using the faster HEAD method for getting the basic URL infos.
|
static URLHandler.URLInfo |
UNAVAILABLE
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
download(java.net.URL src,
java.io.File dest,
CopyProgressListener l)
Deprecated.
|
long |
getContentLength(java.net.URL url)
Deprecated.
Please prefer getURLInfo when several infos are needed.
|
long |
getContentLength(java.net.URL url,
int timeout)
Deprecated.
|
long |
getLastModified(java.net.URL url)
Deprecated.
Please prefer getURLInfo when several infos are needed.
|
long |
getLastModified(java.net.URL url,
int timeout)
Deprecated.
Please prefer getURLInfo when several infos are needed.
|
URLHandler.URLInfo |
getURLInfo(java.net.URL url)
Deprecated.
|
URLHandler.URLInfo |
getURLInfo(java.net.URL url,
int timeout)
Deprecated.
|
boolean |
isReachable(java.net.URL url)
Deprecated.
Please prefer getURLInfo when several infos are needed.
|
boolean |
isReachable(java.net.URL url,
int timeout)
Deprecated.
Please prefer getURLInfo when several infos are needed.
|
java.io.InputStream |
openStream(java.net.URL url)
Deprecated.
|
void |
setRequestMethod(int requestMethod)
Deprecated.
|
void |
upload(java.io.File src,
java.net.URL dest,
CopyProgressListener l)
Deprecated.
|
static final int REQUEST_METHOD_GET
static final int REQUEST_METHOD_HEAD
static final URLHandler.URLInfo UNAVAILABLE
boolean isReachable(java.net.URL url)
url
- the url to checkboolean isReachable(java.net.URL url, int timeout)
url
- the url to checktimeout
- the timeout in millisecondslong getContentLength(java.net.URL url)
url
- the url to checklong getContentLength(java.net.URL url, int timeout)
url
- the url to checktimeout
- the maximum time before considering an url is not reachable a
timeout of zero indicates no timeoutlong getLastModified(java.net.URL url)
url
- the url to checklong getLastModified(java.net.URL url, int timeout)
url
- the url to checktimeout
- the timeout in millisecondsURLHandler.URLInfo getURLInfo(java.net.URL url)
url
- The url from which information is retrieved.UNAVAILABLE
instance when the
url is not reachable.URLHandler.URLInfo getURLInfo(java.net.URL url, int timeout)
url
- The url from which information is retrieved.timeout
- The timeout in milliseconds.UNAVAILABLE
when the url is
not reachable, never null.java.io.InputStream openStream(java.net.URL url) throws java.io.IOException
url
- dittojava.io.IOException
- if something goes wrongvoid download(java.net.URL src, java.io.File dest, CopyProgressListener l) throws java.io.IOException
src
- URLdest
- Filel
- CopyProgressListenerjava.io.IOException
- if something goes wrongvoid upload(java.io.File src, java.net.URL dest, CopyProgressListener l) throws java.io.IOException
src
- Filedest
- URLl
- CopyProgressListenerjava.io.IOException
- if something goes wrongvoid setRequestMethod(int requestMethod)
Copyright ©2007-2022 The Apache Software Foundation, Licensed under Apache License, Version 2.0.