Class FTPDownloadData

java.lang.Object
org.deltava.util.ftp.FTPDownloadData

public class FTPDownloadData extends Object
A bean to store FTP download data.
Since:
1.0
Version:
1.0
Author:
Luke
  • Constructor Details

    • FTPDownloadData

      FTPDownloadData(String fileName, long size, long time)
      Creates a new FTP download entry for a downloaded file.
      Parameters:
      fileName - the file name
      size - the file size
      time - 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

      public String getFileName()
      Returns the name of the file.
      Returns:
      the file name
    • 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