com.jscape.inet.ftp

## Class FtpProgressEvent

- java.lang.Object
- - java.util.EventObject
  - - com.jscape.inet.ftp.FtpEvent
    - - com.jscape.inet.ftp.FtpProgressEvent

- All Implemented Interfaces:
    java.io.Serializable

      public class FtpProgressEvent
      extends FtpEvent

  Fired on significant progress in upload and download operations in Ftp class.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DOWNLOAD` Indicates DOWNLOAD process
    `static int` | `UPLOAD` Indicates UPLOAD process

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FtpProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long readBytes, long totalBytes)` Constructs new `FtpProgressEvent`.
    `FtpProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, java.lang.String localFilePath, int mode, long bytes, long readBytes, long totalBytes)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(FtpListener listener)` Event is accepted by listener
    `java.lang.String` | `getAbsolutePath()` Gets absolute path of file transferred.
    `long` | `getBytes()` Gets the number of bytes transferred so far.
    `java.lang.String` | `getFilename()` Gets name of file transferred.
    `java.lang.String` | `getLocalFilePath()`
    `int` | `getMode()` Gets mode of transfer, upload or download.
    `long` | `getReadBytes()` Get the number of bytes read at one time.
    `long` | `getTotalBytes()` Gets the number of bytes for the file being transferred

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

      `getSource, toString`

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

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

- - ### Field Detail

    - #### UPLOAD

          public static final int UPLOAD

      Indicates UPLOAD process
      See Also:
        Constant Field Values

    - #### DOWNLOAD

          public static final int DOWNLOAD

      Indicates DOWNLOAD process
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FtpProgressEvent

          public FtpProgressEvent(java.lang.Object source,
                                  java.lang.String filename,
                                  java.lang.String path,
                                  int mode,
                                  long bytes,
                                  long readBytes,
                                  long totalBytes)

      Constructs new `FtpProgressEvent`.
      Parameters:
        `source` - the source of this event
        `filename` - the name of file being transferred
        `mode` - the direction of transfer
        `bytes` - the number of bytes transferred
        `totalBytes` - the number of bytes for the file being transferred

    - #### FtpProgressEvent

          public FtpProgressEvent(java.lang.Object source,
                                  java.lang.String filename,
                                  java.lang.String path,
                                  java.lang.String localFilePath,
                                  int mode,
                                  long bytes,
                                  long readBytes,
                                  long totalBytes)

      Constructor.
      Parameters:
        `source` -
        `filename` -
        `path` -
        `localFilePath` -
        `mode` -
        `bytes` -
        `readBytes` -
        `totalBytes` -

  - ### Method Detail

    - #### getLocalFilePath

          public java.lang.String getLocalFilePath()

    - #### getReadBytes

          public long getReadBytes()

      Get the number of bytes read at one time.
      Returns:
        bytes

    - #### getMode

          public int getMode()

      Gets mode of transfer, upload or download.
      Returns:
        mode
      See Also:
        `UPLOAD`, `DOWNLOAD`

    - #### getFilename

          public java.lang.String getFilename()

      Gets name of file transferred.
      Returns:
        filename

    - #### getAbsolutePath

          public java.lang.String getAbsolutePath()

      Gets absolute path of file transferred.
      Returns:
        absolute path

    - #### getBytes

          public long getBytes()

      Gets the number of bytes transferred so far.
      Returns:
        bytes

    - #### getTotalBytes

          public long getTotalBytes()

      Gets the number of bytes for the file being transferred
      Returns:
        bytes

    - #### accept

          public void accept(FtpListener listener)

      Description copied from class: `FtpEvent`
      Event is accepted by listener
      Specified by:
        `accept` in class `FtpEvent`

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