Secure iNet Factory

com.jscape.filetransfer
Class FileTransferProgressEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jscape.filetransfer.FileTransferEvent
          extended by com.jscape.filetransfer.FileTransferProgressEvent
All Implemented Interfaces:
java.io.Serializable

public class FileTransferProgressEvent
extends FileTransferEvent

Fired on significant progress in upload and download operations in FileTransfer derived classes.

See Also:
Serialized Form

Field Summary
static int DOWNLOAD
           
static int UPLOAD
           
 
Constructor Summary
FileTransferProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long totalBytes)
          Constructs new FileTransferProgressEvent.
FileTransferProgressEvent(java.lang.Object source, java.lang.String filename, java.lang.String path, int mode, long bytes, long readBytes, long totalBytes)
          Constructor.
FileTransferProgressEvent(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
 void accept(FileTransferListener listener)
          Accepts event via FileTransferListener.
 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()
          Get the local file path.
 int getMode()
          Gets mode of transfer, upload or download.
 long getReadBytes()
           
 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
See Also:
Constant Field Values

DOWNLOAD

public static final int DOWNLOAD
See Also:
Constant Field Values
Constructor Detail

FileTransferProgressEvent

public FileTransferProgressEvent(java.lang.Object source,
                                 java.lang.String filename,
                                 java.lang.String path,
                                 int mode,
                                 long bytes,
                                 long totalBytes)
Constructs new FileTransferProgressEvent.

Parameters:
source - the source of this event
filename - the name of file being transferred
path - the file path of file transferred
mode - the direction of transfer
bytes - the number of bytes transferred
totalBytes - the number of bytes for the file being transferred

FileTransferProgressEvent

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

Parameters:
source -
filename -
path -
mode -
bytes -
readBytes -
initialOffset -
totalBytes -

FileTransferProgressEvent

public FileTransferProgressEvent(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()
Get the local file path.

Returns:
path

getReadBytes

public long getReadBytes()
Returns:
readBytes

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:
the 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(FileTransferListener listener)
Accepts event via FileTransferListener.

Specified by:
accept in class FileTransferEvent
Parameters:
listener - the listener which receives event

Secure iNet Factory

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