public interface IFileTransfer extends org.eclipse.core.runtime.IAdaptable, IIdentifiable
IOutgoingFileTransfer
and
IIncomingFileTransfer
transfer sub interfaces.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel this file transfer.
|
java.lang.Exception |
getException()
Get any exception associated with this file transfer.
|
long |
getFileLength()
Return resulting file length (in bytes) for this file transfer instance.
|
double |
getPercentComplete()
Get the percent complete for this file transfer.
|
boolean |
isDone()
Return true if this file transfer is done, false if not yet completed.
|
getID
void cancel()
IFileTransferEvent
being delivered to the
IFileTransferListener
indicating that transfer is done (isDone()
returns true), and some exception will be made availabledouble getPercentComplete()
isDone()
method should be consulted to determine if the file
transfer has completed (with or without error).java.lang.Exception getException()
isDone()
method returns true.
If the file transfer completed successfully, isDone()
will
return true, and this method will return null. If the file transfer
completed unsuccessfully (some exception occurred), then
isDone()
will return true, and this method will return a
non-null Exception instance that occurred.
If the the file transfer was canceled by the user, then the exception
returned will be an instance of UserCancelledException
.
null
if transfer completed successfully, non-null if transfer
completed with some exception. Only valid after
isDone()
returns true.boolean isDone()
getException()
method.long getFileLength()
IFileRangeSpecification
is provided that the returned
file length is the expected file length of just the range retrieved (and not the entire file).