Class FTPDownloadData
java.lang.Object
org.deltava.util.ftp.FTPDownloadData
A bean to store FTP download data.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Luke
-
Constructor Summary
ConstructorsConstructorDescriptionFTPDownloadData
(File localFile) Creates a new FTP download entry from a cached local file.FTPDownloadData
(String fileName, long size, long time) Creates a new FTP download entry for a downloaded file. -
Method Summary
-
Constructor Details
-
FTPDownloadData
FTPDownloadData(String fileName, long size, long time) Creates a new FTP download entry for a downloaded file.- Parameters:
fileName
- the file namesize
- the file sizetime
- the download time in milliseconds
-
FTPDownloadData
FTPDownloadData(File localFile) Creates a new FTP download entry from a cached local file.- Parameters:
localFile
- the local file
-
-
Method Details
-
getSize
public long getSize()Returns the file size.- Returns:
- the size in bytes
-
getDownloadTime
public long getDownloadTime()Returns the total download time.- Returns:
- the time in milliseconds
-
getSpeed
public int getSpeed()Returns the download speed.- Returns:
- the speed in bytes per second
-
getFileName
-
isCached
public boolean isCached()Returns whether the file was downloaded, or is a cached local copy.- Returns:
- TRUE if the file was cached on the local filesystem, otherwise FALSE
-