Code example for URL

Methods: getFile

0
    public DownloadTask(Context context, String url, String path, DownloadTaskListener listener)
            throws MalformedURLException { 
 
        super(); 
        this.url = url;
        this.URL = new URL(url);
        this.listener = listener;
        String fileName = new File(URL.getFile()).getName();
        this.file = new File(path, fileName);
        this.tempFile = new File(path, fileName + TEMP_SUFFIX);
        this.context = context;
    } 
 
    public String getUrl() {
 
        return url;
    } 
 
    public boolean isInterrupt() { 
 
        return interrupt;