|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransferCallback
This is the callback interface used to receive the status of an
AsyncTransferrer
. Exactly one of the methods declared in this
interface are called when the transfer is done (successful or unsuccessful).
ATTENTION:
The according method of this callback will (typically) be invoked by a
different Thread
. Please ensure that your implementation is
thread-safe.
StreamUtilImpl.transferAsync(java.io.InputStream,
java.io.OutputStream, boolean, TransferCallback)
Method Summary | |
---|---|
void |
transferCompleted(long bytesTransferred)
This method is invoked if the transfer completed successfully. |
void |
transferFailed(Exception e)
This method is invoked if the transfer failed because an exception occurred. |
void |
transferStopped(long bytesTransferred)
This method is invoked if the transfer was stopped before it completed. |
Method Detail |
---|
void transferCompleted(long bytesTransferred)
bytesTransferred
- is the number of bytes that have been transferred.void transferStopped(long bytesTransferred)
bytesTransferred
- is the number of bytes that have been transferred
until the task has been stopped.void transferFailed(Exception e)
IOException
. It may
also be a RuntimeException
.
e
- is the exception indicating the problem.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |