com.jscape.filetransfer

## Class FileTransferDownloadEvent

- java.lang.Object
- - java.util.EventObject
  - - com.jscape.filetransfer.FileTransferEvent
    - - com.jscape.filetransfer.FileTransferDownloadEvent

- All Implemented Interfaces:
    java.io.Serializable

      public class FileTransferDownloadEvent
      extends FileTransferEvent

  Fired when file is downloaded from server.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileTransferDownloadEvent(FileTransfer source, java.lang.String filename, java.lang.String path, java.lang.String localPath, long size, long time)`
    `FileTransferDownloadEvent(FileTransfer source, java.lang.String filename, java.lang.String path, java.lang.String localPath, long size, long time, boolean interrupted)` Creates a new event instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(FileTransferListener listener)` Accepts event via FileTransferListener.
    `java.lang.String` | `getFilename()` Gets name of file downloaded.
    `java.lang.String` | `getLocalPath()` Returns downloaded file local path.
    `java.lang.String` | `getPath()` Gets remote directory path that file was downloaded from.
    `long` | `getSize()` Gets total bytes transmitted.
    `long` | `getTime()` Gets total time to transfer file measured in milliseconds.
    `boolean` | `isInterrupted()` Indicates if the download operations was interrupted by the user or network connection.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.util.EventObject

      `getSource`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FileTransferDownloadEvent

          public FileTransferDownloadEvent(FileTransfer source,
                                           java.lang.String filename,
                                           java.lang.String path,
                                           java.lang.String localPath,
                                           long size,
                                           long time,
                                           boolean interrupted)

      Creates a new event instance.
      Parameters:
        `source` - the source of the event
        `filename` - the file downloaded
        `path` - the remote directory path file was downloaded from
        `localPath` - the local file path
        `size` - the size of the file downloaded in bytes
        `time` - the time to download in milliseconds
        `interrupted` - interrupted flag

    - #### FileTransferDownloadEvent

          public FileTransferDownloadEvent(FileTransfer source,
                                           java.lang.String filename,
                                           java.lang.String path,
                                           java.lang.String localPath,
                                           long size,
                                           long time)

  - ### Method Detail

    - #### getFilename

          public java.lang.String getFilename()

      Gets name of file downloaded.
      Returns:
        filename

    - #### getPath

          public java.lang.String getPath()

      Gets remote directory path that file was downloaded from.
      Returns:
        the remote directory path

    - #### getLocalPath

          public java.lang.String getLocalPath()

      Returns downloaded file local path.
      Returns:
        downloaded file local path

    - #### getSize

          public long getSize()

      Gets total bytes transmitted.
      Returns:
        bytes transmitted

    - #### getTime

          public long getTime()

      Gets total time to transfer file measured in milliseconds.
      Returns:
        total time

    - #### isInterrupted

          public boolean isInterrupted()

      Indicates if the download operations was interrupted by the user or network connection.
      Returns:
        `true` if the transfer was interrupted.

    - #### accept

          public void accept(FileTransferListener listener)

      Accepts event via FileTransferListener.
      Specified by:
        `accept` in class `FileTransferEvent`
      Parameters:
        `listener` - the listener which receives event

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.util.EventObject`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved