Class MultipartDownloadResumeContext


  • public class MultipartDownloadResumeContext
    extends Object
    This class keep tracks of the state of a multipart download across multipart GET requests.
    • Constructor Detail

      • MultipartDownloadResumeContext

        public MultipartDownloadResumeContext()
      • MultipartDownloadResumeContext

        public MultipartDownloadResumeContext​(Collection<Integer> completedParts,
                                              Long bytesToLastCompletedParts)
    • Method Detail

      • completedParts

        public List<Integer> completedParts()
      • bytesToLastCompletedParts

        public Long bytesToLastCompletedParts()
      • addCompletedPart

        public void addCompletedPart​(int partNumber)
      • addToBytesToLastCompletedParts

        public void addToBytesToLastCompletedParts​(long bytes)
      • totalParts

        public void totalParts​(int totalParts)
      • totalParts

        public Integer totalParts()
      • highestSequentialCompletedPart

        public int highestSequentialCompletedPart()
        Returns:
        the highest sequentially completed part, 0 means no parts completed. Used for non-sequential operation when parts may have been completed in a non-sequential order. For example, if parts [1, 2, 3, 6, 7, 10] were completed, this method will return 3.
      • isComplete

        public boolean isComplete()
        Check if the multipart download is complete or not by checking if the total amount of downloaded parts is equal to the total amount of parts.
        Returns:
        true if all parts were downloaded, false if not.