Package apple.foundation.protocol
Interface NSURLSessionDownloadDelegate
-
- All Superinterfaces:
NSURLSessionDelegate,NSURLSessionTaskDelegate
public interface NSURLSessionDownloadDelegate extends NSURLSessionTaskDelegate
Messages related to the operation of a task that writes data to a file and notifies the delegate upon completion. API-Since: 7.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionDelegate
NSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
NSURLSessionTaskDelegate.Block_URLSessionTaskDidReceiveChallengeCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStream, NSURLSessionTaskDelegate.Block_URLSessionTaskNeedNewBodyStreamFromOffsetCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillBeginDelayedRequestCompletionHandler, NSURLSessionTaskDelegate.Block_URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidURLSessionDownloadTaskDidFinishDownloadingToURL(@NotNull NSURLSession session, @NotNull NSURLSessionDownloadTask downloadTask, @NotNull NSURL location)Sent when a download task that has completed a download.default voidURLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes(@NotNull NSURLSession session, @NotNull NSURLSessionDownloadTask downloadTask, long fileOffset, long expectedTotalBytes)Sent when a download has been resumed.default voidURLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite(@NotNull NSURLSession session, @NotNull NSURLSessionDownloadTask downloadTask, long bytesWritten, long totalBytesWritten, long totalBytesExpectedToWrite)Sent periodically to notify the delegate of download progress.-
Methods inherited from interface apple.foundation.protocol.NSURLSessionDelegate
URLSessionDidBecomeInvalidWithError, URLSessionDidFinishEventsForBackgroundURLSession, URLSessionDidReceiveChallengeCompletionHandler
-
Methods inherited from interface apple.foundation.protocol.NSURLSessionTaskDelegate
URLSessionDidCreateTask, URLSessionTaskDidCompleteWithError, URLSessionTaskDidFinishCollectingMetrics, URLSessionTaskDidReceiveChallengeCompletionHandler, URLSessionTaskDidReceiveInformationalResponse, URLSessionTaskDidSendBodyDataTotalBytesSentTotalBytesExpectedToSend, URLSessionTaskIsWaitingForConnectivity, URLSessionTaskNeedNewBodyStream, URLSessionTaskNeedNewBodyStreamFromOffsetCompletionHandler, URLSessionTaskWillBeginDelayedRequestCompletionHandler, URLSessionTaskWillPerformHTTPRedirectionNewRequestCompletionHandler
-
-
-
-
Method Detail
-
URLSessionDownloadTaskDidFinishDownloadingToURL
void URLSessionDownloadTaskDidFinishDownloadingToURL(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionDownloadTask downloadTask, @NotNull @NotNull NSURL location)Sent when a download task that has completed a download. The delegate should copy or move the file at the given location to a new location as it will be removed when the delegate message returns. URLSession:task:didCompleteWithError: will still be called.
-
URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes
default void URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionDownloadTask downloadTask, long fileOffset, long expectedTotalBytes)Sent when a download has been resumed. If a download failed with an error, the -userInfo dictionary of the error will contain an NSURLSessionDownloadTaskResumeData key, whose value is the resume data.
-
URLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite
default void URLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite(@NotNull @NotNull NSURLSession session, @NotNull @NotNull NSURLSessionDownloadTask downloadTask, long bytesWritten, long totalBytesWritten, long totalBytesExpectedToWrite)Sent periodically to notify the delegate of download progress.
-
-