de.undercouch.gradle.tasks.download
Interface DownloadSpec

All Known Implementing Classes:
Download, DownloadAction

public interface DownloadSpec

An interface for classes that perform file downloads


Method Summary
 void compress(boolean compress)
          Specifies if compression should be used during download
 void dest(java.lang.Object dest)
          Sets the download destination
 java.io.File getDest()
           
 java.lang.String getPassword()
           
 java.net.URL getSrc()
           
 java.lang.String getUsername()
           
 boolean isCompress()
           
 boolean isOnlyIfNewer()
           
 boolean isOverwrite()
           
 boolean isQuiet()
           
 void onlyIfNewer(boolean onlyIfNewer)
          Sets the onlyIfNewer flag
 void overwrite(boolean overwrite)
          Sets the overwrite flag
 void password(java.lang.String password)
          Sets the password for Basic authentication
 void quiet(boolean quiet)
          Sets the quiet flag
 void src(java.lang.Object src)
          Sets the download source URL
 void username(java.lang.String username)
          Sets the username for Basic authentication
 

Method Detail

src

void src(java.lang.Object src)
         throws java.net.MalformedURLException
Sets the download source URL

Parameters:
src - the URL
Throws:
java.net.MalformedURLException - if the download source is not a URL

dest

void dest(java.lang.Object dest)
Sets the download destination

Parameters:
dest - a file or directory where to store the retrieved file

quiet

void quiet(boolean quiet)
Sets the quiet flag

Parameters:
quiet - true if download progress should not be logged

overwrite

void overwrite(boolean overwrite)
Sets the overwrite flag

Parameters:
overwrite - true if existing files should be overwritten, false otherwise

onlyIfNewer

void onlyIfNewer(boolean onlyIfNewer)
Sets the onlyIfNewer flag

Parameters:
onlyIfNewer - true if the file should only be downloaded if it has been modified on the server since the last download

compress

void compress(boolean compress)
Specifies if compression should be used during download

Parameters:
compress - true if compression should be enabled

username

void username(java.lang.String username)
Sets the username for Basic authentication

Parameters:
username - the username

password

void password(java.lang.String password)
Sets the password for Basic authentication

Parameters:
password - the password

getSrc

java.net.URL getSrc()
Returns:
the download source

getDest

java.io.File getDest()
Returns:
the download destination

isQuiet

boolean isQuiet()
Returns:
the quiet flag

isOverwrite

boolean isOverwrite()
Returns:
the overwrite flag

isOnlyIfNewer

boolean isOnlyIfNewer()
Returns:
the onlyIfNewer flag

isCompress

boolean isCompress()
Returns:
true if compression is enabled

getUsername

java.lang.String getUsername()
Returns:
the username for Basic authentication

getPassword

java.lang.String getPassword()
Returns:
the password for Basic authentication