Class ResumableFileUpload
java.lang.Object
software.amazon.awssdk.transfer.s3.model.ResumableFileUpload
- All Implemented Interfaces:
ResumableTransfer,ToCopyableBuilder<ResumableFileUpload.Builder,ResumableFileUpload>
public final class ResumableFileUpload
extends Object
implements ResumableTransfer, ToCopyableBuilder<ResumableFileUpload.Builder,ResumableFileUpload>
POJO class that holds the state and can be used to resume a paused upload file 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 TypeMethodDescriptionstatic ResumableFileUpload.Builderbuilder()booleanLast modified time of the file since last pauselongFile length since last pausestatic ResumableFileUploadDeserializes bytes with JSON data into aResumableFileUpload.static ResumableFileUploadDeserializes data at the given path into aResumableFileUpload.static ResumableFileUploadfromString(String contents) Deserializes a string with JSON data into aResumableFileUpload.inthashCode()The multipart upload ID, orOptional.empty()if unknownReturn the part size in bytes orOptionalLong.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()Return the total number of parts associated with this transfer orOptionalLong.empty()if unknownReturn the total number of parts completed with this transfer orOptionalLong.empty()if unknownMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
equals
-
hashCode
-
builder
-
uploadFileRequest
- Returns:
- the
UploadFileRequestto resume
-
fileLastModified
Last modified time of the file since last pause -
fileLength
public long fileLength()File length since last pause -
partSizeInBytes
Return the part size in bytes orOptionalLong.empty()if unknown -
totalParts
Return the total number of parts associated with this transfer orOptionalLong.empty()if unknown -
multipartUploadId
The multipart upload ID, orOptional.empty()if unknown- Returns:
- the optional total size of the transfer.
-
transferredParts
Return the total number of parts completed with this transfer orOptionalLong.empty()if unknown -
serializeToFile
Description copied from interface:ResumableTransferPersists 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
Description copied from interface:ResumableTransferWrites 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
Description copied from interface:ResumableTransferReturns the serialized JSON data representing this object as a string.- Specified by:
serializeToStringin interfaceResumableTransfer
-
serializeToBytes
Description copied from interface:ResumableTransferReturns the serialized JSON data representing this object as anSdkBytesobject.- Specified by:
serializeToBytesin interfaceResumableTransfer- Returns:
- the serialized JSON as
SdkBytes
-
serializeToInputStream
Description copied from interface:ResumableTransferReturns the serialized JSON data representing this object as anInputStream.- Specified by:
serializeToInputStreamin interfaceResumableTransfer- Returns:
- the serialized JSON input stream
-
fromFile
Deserializes data at the given path into aResumableFileUpload.- Parameters:
path- ThePathto the file with serialized data- Returns:
- the deserialized
ResumableFileUpload
-
fromBytes
Deserializes bytes with JSON data into aResumableFileUpload.- Parameters:
bytes- the serialized data- Returns:
- the deserialized
ResumableFileUpload
-
fromString
Deserializes a string with JSON data into aResumableFileUpload.- Parameters:
contents- the serialized data- Returns:
- the deserialized
ResumableFileUpload
-
toString
-
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<ResumableFileUpload.Builder,ResumableFileUpload> - Returns:
- a builder for type T
-