org.alfresco.webdrone
Class FileDownloader

java.lang.Object
  extended by org.alfresco.webdrone.FileDownloader

public class FileDownloader
extends Object

Downloads file from given url using WebDrone's session details extracted from a cookie.

Since:
1.2
Author:
Michael Suzuki

Constructor Summary
FileDownloader(WebDrone drone)
           
 
Method Summary
 void download(String path, File file)
          Main method that performs the download operation using HttpClient with WebDrone's cookies.
 String getLocalDownloadPath()
           
 void setFollowRedirects(boolean followRedirects)
           
 void setLocalDownloadPath(String localDownloadPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDownloader

public FileDownloader(WebDrone drone)
Method Detail

setFollowRedirects

public void setFollowRedirects(boolean followRedirects)

getLocalDownloadPath

public String getLocalDownloadPath()

setLocalDownloadPath

public void setLocalDownloadPath(String localDownloadPath)

download

public void download(String path,
                     File file)
              throws Exception
Main method that performs the download operation using HttpClient with WebDrone's cookies.

Parameters:
path - url path to file
Throws:
Exception - if error


Copyright © 2013. All Rights Reserved.