|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.util.HttpUtils
Http utils for retrieving files.
Constructor Summary | |
---|---|
HttpUtils()
|
Method Summary | |
---|---|
static void |
getFile(java.lang.String url,
java.io.File destinationFile,
boolean ignoreErrors,
boolean useTimestamp,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword)
Retrieve a remote file. |
static void |
getFile(java.lang.String url,
java.io.File destinationFile,
boolean ignoreErrors,
boolean useTimestamp,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword,
boolean useChecksum)
Retrieve a remote file. |
static void |
getFile(java.lang.String url,
java.io.File destinationFile,
boolean ignoreErrors,
boolean useTimestamp,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword,
java.lang.String loginHost,
java.lang.String loginDomain,
boolean useChecksum)
Retrieve a remote file. |
static void |
getFile(java.lang.String url,
java.io.File destinationFile,
boolean ignoreErrors,
boolean useTimestamp,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword,
java.lang.String loginHost,
java.lang.String loginDomain,
DownloadMeter downloadMeter)
Retrieve a remote file. |
static void |
getFile(java.lang.String url,
java.io.File destinationFile,
long timestamp,
java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword,
java.lang.String loginHost,
java.lang.String loginDomain,
DownloadMeter downloadMeter)
Retrieve a remote file. |
static java.lang.String[] |
parseUrl(java.lang.String url)
Parse an url which might contain a username and password. |
static void |
setMeterType(java.lang.String type)
|
static void |
useProxyUser(java.lang.String proxyHost,
java.lang.String proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword)
Use a proxy to bypass the firewall with or without authentication |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpUtils()
Method Detail |
public static void useProxyUser(java.lang.String proxyHost, java.lang.String proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword)
proxyHost
- Proxy Host (if proxy is required), or nullproxyPort
- Proxy Port (if proxy is required), or nullproxyUserName
- Proxy Username (if authentification is required),
or nullproxyPassword
- Proxy Password (if authentification is required),
or null
java.lang.SecurityException
- if an operation is not authorized by the
SecurityManagerpublic static void getFile(java.lang.String url, java.io.File destinationFile, boolean ignoreErrors, boolean useTimestamp, java.lang.String proxyHost, java.lang.String proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword, boolean useChecksum) throws java.io.IOException
url
- the of the file to retrievedestinationFile
- where to store itignoreErrors
- whether to ignore errors during I/O or throw an
exception when they happenuseTimestamp
- whether to check the modified timestamp on the
destinationFile
against the remote source
proxyHost
- Proxy Host (if proxy is required), or nullproxyPort
- Proxy Port (if proxy is required), or nullproxyUserName
- Proxy Username (if authentification is required),
or null.proxyPassword
- Proxy Password (if authentification is required),
or null.useChecksum
- Flag to indicate the use of the checksum for the retrieved
artifact if it is available.
java.io.IOException
public static void getFile(java.lang.String url, java.io.File destinationFile, boolean ignoreErrors, boolean useTimestamp, java.lang.String proxyHost, java.lang.String proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword, java.lang.String loginHost, java.lang.String loginDomain, boolean useChecksum) throws java.io.IOException
url
- the of the file to retrievedestinationFile
- where to store itignoreErrors
- whether to ignore errors during I/O or throw an
exception when they happenuseTimestamp
- whether to check the modified timestamp on the
destinationFile
against the remote source
proxyHost
- Proxy Host (if proxy is required), or nullproxyPort
- Proxy Port (if proxy is required), or nullproxyUserName
- Proxy Username (if authentification is required),
or null.proxyPassword
- Proxy Password (if authentification is required),
or null.useChecksum
- Flag to indicate the use of the checksum for the retrieved
artifact if it is available.loginHost
- The host the authentication request is originating from.
Essentially, the computer name for this machine.loginDomain
- the domain to authenticate within.
java.io.IOException
public static void getFile(java.lang.String url, java.io.File destinationFile, boolean ignoreErrors, boolean useTimestamp, java.lang.String proxyHost, java.lang.String proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword) throws java.io.IOException
url
- the of the file to retrievedestinationFile
- where to store itignoreErrors
- whether to ignore errors during I/O or throw an
exception when they happenuseTimestamp
- whether to check the modified timestamp on the
destinationFile
against the remote source
proxyHost
- Proxy Host (if proxy is required), or nullproxyPort
- Proxy Port (if proxy is required), or nullproxyUserName
- Proxy Username (if authentification is required),
or nullproxyPassword
- Proxy Password (if authentification is required),
or null
java.io.IOException
public static void getFile(java.lang.String url, java.io.File destinationFile, boolean ignoreErrors, boolean useTimestamp, java.lang.String proxyHost, java.lang.String proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword, java.lang.String loginHost, java.lang.String loginDomain, DownloadMeter downloadMeter) throws java.io.IOException
url
- the of the file to retrievedestinationFile
- where to store itignoreErrors
- whether to ignore errors during I/O or throw an
exception when they happenuseTimestamp
- whether to check the modified timestamp on the
destinationFile
against the remote source
proxyHost
- Proxy Host (if proxy is required), or nullproxyPort
- Proxy Port (if proxy is required), or nullproxyUserName
- Proxy Username (if authentification is required),
or nullproxyPassword
- Proxy Password (if authentification is required),
or nullloginHost
- The host the authentication request is originating from.
Essentially, the computer name for this machine.loginDomain
- the domain to authenticate within.downloadMeter
- the download meter to use
java.io.IOException
public static void getFile(java.lang.String url, java.io.File destinationFile, long timestamp, java.lang.String proxyHost, java.lang.String proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword, java.lang.String loginHost, java.lang.String loginDomain, DownloadMeter downloadMeter) throws java.io.IOException
url
- the URL of the file to retrievedestinationFile
- where to store ittimestamp
- if provided, the remote URL is only retrieved if it was
modified more recently than timestamp. Otherwise, negative value indicates that
the remote URL should be retrieved unconditionally.proxyHost
- Proxy Host (if proxy is required), or nullproxyPort
- Proxy Port (if proxy is required), or nullproxyUserName
- Proxy Username (if authentification is required),
or nullproxyPassword
- Proxy Password (if authentification is required),
or nullloginHost
- The host the authentication request is originating from.
Essentially, the computer name for this machine.loginDomain
- the domain to authenticate within.downloadMeter
- the download meter to use
java.io.IOException
- If an I/O exception occurs.public static java.lang.String[] parseUrl(java.lang.String url)
url
- The url to parse.
public static void setMeterType(java.lang.String type)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |