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.context = context;
    } 
 
    public String getUrl() {
	return url;
    } 
     
    public long getDownloadPercent() { 
	return downloadPercent;
    } 
     
    public long getDownloadSize() {