Class TransferCompleteness
java.lang.Object
slash.navigation.download.performer.TransferCompleteness
Pure functions to reason about the completeness of an HTTP transfer: the inclusive
range end for a resume request, the total bytes a temp file must have afterward, and
whether a transfer that fell short of that total may still serve a later resume.
- Author:
- Christian Pesch
-
Method Summary
Modifier and TypeMethodDescriptionstatic LongexpectedBytesOnDisk(long resumeOffset, Long responseContentLength) static booleanisComplete(long bytesOnDisk, Long expectedBytesOnDisk) static booleankeepForResume(long bytesOnDisk, Long expectedBytesOnDisk) static LongresumeRangeEnd(Long contentLength)
-
Method Details
-
resumeRangeEnd
-
expectedBytesOnDisk
-
isComplete
-
keepForResume
-