Class ResumableFileDownload
java.lang.Object
software.amazon.awssdk.transfer.s3.model.ResumableFileDownload
- All Implemented Interfaces:
ResumableTransfer,ToCopyableBuilder<ResumableFileDownload.Builder,ResumableFileDownload>
public final class ResumableFileDownload
extends Object
implements ResumableTransfer, ToCopyableBuilder<ResumableFileDownload.Builder,ResumableFileDownload>
An opaque token that holds the state and can be used to resume a paused download operation.
Serialization: When serializing this token, the following structures will not be preserved/persisted:
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()longRetrieve the number of bytes that have been transferred.The lists of parts that were successfully completed and saved to the file.booleanLast modified time of the file since last pausestatic ResumableFileDownloadDeserialize bytes with JSON data into aResumableFileDownload.static ResumableFileDownloadDeserialize data at the given path into aResumableFileDownload.static ResumableFileDownloadfromString(String contents) Deserialize a string with JSON data into aResumableFileDownload.inthashCode()Last modified time of the S3 object since last pause, orOptional.empty()if unknownReturns the serialized JSON data representing this object as anSdkBytesobject.voidserializeToFile(Path path) Persists this download object to a file in Base64-encoded JSON format.Returns the serialized JSON data representing this object as anInputStream.voidserializeToOutputStream(OutputStream outputStream) Writes the serialized JSON data representing this object to an output stream.Returns the serialized JSON data representing this object as a string.Take this object and create a builder that contains all of the current property values of this object.toString()The total size of the transfer in bytes orOptionalLong.empty()if unknownMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
equals
-
hashCode
-
builder
-
downloadFileRequest
- Returns:
- the
DownloadFileRequestto resume
-
bytesTransferred
public long bytesTransferred()Retrieve the number of bytes that have been transferred.- Returns:
- the number of bytes
-
s3ObjectLastModified
Last modified time of the S3 object since last pause, orOptional.empty()if unknown -
fileLastModified
Last modified time of the file since last pause -
totalSizeInBytes
The total size of the transfer in bytes orOptionalLong.empty()if unknown- Returns:
- the optional total size of the transfer.
-
completedParts
-
toString
-
serializeToFile
Persists this download object to a file in Base64-encoded JSON format.- Specified by:
serializeToFilein interfaceResumableTransfer- Parameters:
path- The path to the file to which you want to write the serialized download object.
-
serializeToOutputStream
Writes the serialized JSON data representing this object to an output stream. Note that theOutputStreamis not closed or flushed after writing.- Specified by:
serializeToOutputStreamin interfaceResumableTransfer- Parameters:
outputStream- The output stream to write the serialized object to.
-
serializeToString
Returns the serialized JSON data representing this object as a string.- Specified by:
serializeToStringin interfaceResumableTransfer
-
serializeToBytes
Returns the serialized JSON data representing this object as anSdkBytesobject.- Specified by:
serializeToBytesin interfaceResumableTransfer- Returns:
- the serialized JSON as
SdkBytes
-
serializeToInputStream
Returns the serialized JSON data representing this object as anInputStream.- Specified by:
serializeToInputStreamin interfaceResumableTransfer- Returns:
- the serialized JSON input stream
-
fromFile
Deserialize data at the given path into aResumableFileDownload.- Parameters:
path- ThePathto the file with serialized data- Returns:
- the deserialized
ResumableFileDownload
-
fromBytes
Deserialize bytes with JSON data into aResumableFileDownload.- Parameters:
bytes- the serialized data- Returns:
- the deserialized
ResumableFileDownload
-
fromString
Deserialize a string with JSON data into aResumableFileDownload.- Parameters:
contents- the serialized data- Returns:
- the deserialized
ResumableFileDownload
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<ResumableFileDownload.Builder,ResumableFileDownload> - Returns:
- a builder for type T
-