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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResumableFileUpload.Builder
builder()
boolean
Last modified time of the file since last pauselong
File length since last pausestatic ResumableFileUpload
Deserializes bytes with JSON data into aResumableFileUpload
.static ResumableFileUpload
Deserializes data at the given path into aResumableFileUpload
.static ResumableFileUpload
fromString
(String contents) Deserializes a string with JSON data into aResumableFileUpload
.int
hashCode()
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 anSdkBytes
object.void
serializeToFile
(Path path) Persists this download object to a file in Base64-encoded JSON format.Returns the serialized JSON data representing this object as anInputStream
.void
serializeToOutputStream
(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
public int hashCode() -
builder
-
uploadFileRequest
- Returns:
- the
UploadFileRequest
to 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:ResumableTransfer
Persists this download object to a file in Base64-encoded JSON format.- Specified by:
serializeToFile
in interfaceResumableTransfer
- Parameters:
path
- The path to the file to which you want to write the serialized download object.
-
serializeToOutputStream
Description copied from interface:ResumableTransfer
Writes the serialized JSON data representing this object to an output stream. Note that theOutputStream
is not closed or flushed after writing.- Specified by:
serializeToOutputStream
in interfaceResumableTransfer
- Parameters:
outputStream
- The output stream to write the serialized object to.
-
serializeToString
Description copied from interface:ResumableTransfer
Returns the serialized JSON data representing this object as a string.- Specified by:
serializeToString
in interfaceResumableTransfer
-
serializeToBytes
Description copied from interface:ResumableTransfer
Returns the serialized JSON data representing this object as anSdkBytes
object.- Specified by:
serializeToBytes
in interfaceResumableTransfer
- Returns:
- the serialized JSON as
SdkBytes
-
serializeToInputStream
Description copied from interface:ResumableTransfer
Returns the serialized JSON data representing this object as anInputStream
.- Specified by:
serializeToInputStream
in interfaceResumableTransfer
- Returns:
- the serialized JSON input stream
-
fromFile
Deserializes data at the given path into aResumableFileUpload
.- Parameters:
path
- ThePath
to 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:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ResumableFileUpload.Builder,
ResumableFileUpload> - Returns:
- a builder for type T
-