public class FileTransferProgressEvent extends FileTransferEvent
FileTransfer
derived classes.Constructor and Description |
---|
FileTransferProgressEvent(FileTransfer source,
java.lang.String filename,
java.lang.String absolutePath,
int mode,
long bytes,
long totalBytes)
Constructs new
FileTransferProgressEvent . |
FileTransferProgressEvent(FileTransfer source,
java.lang.String filename,
java.lang.String absolutePath,
int mode,
long bytes,
long readBytes,
long totalBytes)
Constructor.
|
FileTransferProgressEvent(FileTransfer source,
java.lang.String filename,
java.lang.String absolutePath,
java.lang.String localFilePath,
int mode,
long bytes,
long readBytes,
long totalBytes)
Creates a new event instance.
|
Modifier and Type | Method and Description |
---|---|
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()
Returns number of read bytes.
|
long |
getTotalBytes()
Gets the number of bytes for the file being transferred.
|
java.lang.String |
toString() |
public static final int UPLOAD
public static final int DOWNLOAD
public FileTransferProgressEvent(FileTransfer source, java.lang.String filename, java.lang.String absolutePath, java.lang.String localFilePath, int mode, long bytes, long readBytes, long totalBytes)
source
- filename
- absolutePath
- localFilePath
- mode
- bytes
- readBytes
- totalBytes
- public FileTransferProgressEvent(FileTransfer source, java.lang.String filename, java.lang.String absolutePath, int mode, long bytes, long totalBytes)
FileTransferProgressEvent
.source
- the source of this eventfilename
- the name of file being transferredabsolutePath
- the file path of file transferredmode
- the direction of transferbytes
- the number of bytes transferredtotalBytes
- the number of bytes for the file being transferredpublic FileTransferProgressEvent(FileTransfer source, java.lang.String filename, java.lang.String absolutePath, int mode, long bytes, long readBytes, long totalBytes)
source
- filename
- absolutePath
- mode
- bytes
- readBytes
- totalBytes
- public long getBytes()
public long getTotalBytes()
public long getReadBytes()
public java.lang.String getFilename()
public java.lang.String getLocalFilePath()
public java.lang.String getAbsolutePath()
public int getMode()
public void accept(FileTransferListener listener)
accept
in class FileTransferEvent
listener
- the listener which receives eventpublic java.lang.String toString()
toString
in class java.util.EventObject
Copyright © JSCAPE LLC. 1999-2023. All Rights Reserved