public interface TransferCallback
AsyncTransferrer
. Exactly one of the methods
declared in this interface are called when the transfer is done (successful or unsuccessful). Thread
. Please ensure that
your implementation is thread-safe.StreamUtilImpl.transferAsync(java.io.InputStream, java.io.OutputStream, boolean,
TransferCallback)
Modifier and Type | Method and Description |
---|---|
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.
|
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.Copyright © 2001–2016 mmm-Team. All rights reserved.