Secure FTP Factory

com.jscape.inet.ftp
Class FtpProgressEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jscape.inet.ftp.FtpEvent
          extended by 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
static int DOWNLOAD
          Indicates DOWNLOAD process
static int UPLOAD
          Indicates UPLOAD process
 
Constructor Summary
FtpProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long totalBytes)
          Constructs new FtpProgressEvent.
FtpProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long readBytes, long totalBytes)
          Constructs new FtpProgressEvent.
 
Method Summary
 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.
 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 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,
                        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
Method Detail

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

Secure FTP Factory

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