public final class ResumableFileUpload extends Object implements ResumableTransfer, ToCopyableBuilder<ResumableFileUpload.Builder,ResumableFileUpload>
Serialization: When serializing this token, the following structures will not be preserved/persisted:
| Modifier and Type | Class and Description |
|---|---|
static interface |
ResumableFileUpload.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ResumableFileUpload.Builder |
builder() |
boolean |
equals(Object o) |
Instant |
fileLastModified()
Last modified time of the file since last pause
|
long |
fileLength()
File length since last pause
|
static ResumableFileUpload |
fromBytes(SdkBytes bytes)
Deserializes bytes with JSON data into a
ResumableFileUpload. |
static ResumableFileUpload |
fromFile(Path path)
Deserializes data at the given path into a
ResumableFileUpload. |
static ResumableFileUpload |
fromString(String contents)
Deserializes a string with JSON data into a
ResumableFileUpload. |
int |
hashCode() |
Optional<String> |
multipartUploadId()
The multipart upload ID, or
Optional.empty() if unknown |
OptionalLong |
partSizeInBytes()
Return the part size in bytes or
OptionalLong.empty() if unknown |
SdkBytes |
serializeToBytes()
Returns the serialized JSON data representing this object as an
SdkBytes object. |
void |
serializeToFile(Path path)
Persists this download object to a file in Base64-encoded JSON format.
|
InputStream |
serializeToInputStream()
Returns the serialized JSON data representing this object as an
InputStream. |
void |
serializeToOutputStream(OutputStream outputStream)
Writes the serialized JSON data representing this object to an output stream.
|
String |
serializeToString()
Returns the serialized JSON data representing this object as a string.
|
ResumableFileUpload.Builder |
toBuilder() |
String |
toString() |
OptionalLong |
totalParts()
Return the total number of parts associated with this transfer or
OptionalLong.empty() if unknown |
OptionalLong |
transferredParts()
Return the total number of parts completed with this transfer or
OptionalLong.empty() if unknown |
UploadFileRequest |
uploadFileRequest() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic static ResumableFileUpload.Builder builder()
public UploadFileRequest uploadFileRequest()
UploadFileRequest to resumepublic Instant fileLastModified()
public long fileLength()
public OptionalLong partSizeInBytes()
OptionalLong.empty() if unknownpublic OptionalLong totalParts()
OptionalLong.empty() if unknownpublic Optional<String> multipartUploadId()
Optional.empty() if unknownpublic OptionalLong transferredParts()
OptionalLong.empty() if unknownpublic void serializeToFile(Path path)
ResumableTransferserializeToFile in interface ResumableTransferpath - The path to the file to which you want to write the serialized download object.public void serializeToOutputStream(OutputStream outputStream)
ResumableTransferOutputStream is not closed or flushed after writing.serializeToOutputStream in interface ResumableTransferoutputStream - The output stream to write the serialized object to.public String serializeToString()
ResumableTransferserializeToString in interface ResumableTransferpublic SdkBytes serializeToBytes()
ResumableTransferSdkBytes object.serializeToBytes in interface ResumableTransferSdkBytespublic InputStream serializeToInputStream()
ResumableTransferInputStream.serializeToInputStream in interface ResumableTransferpublic static ResumableFileUpload fromFile(Path path)
ResumableFileUpload.path - The Path to the file with serialized dataResumableFileUploadpublic static ResumableFileUpload fromBytes(SdkBytes bytes)
ResumableFileUpload.bytes - the serialized dataResumableFileUploadpublic static ResumableFileUpload fromString(String contents)
ResumableFileUpload.contents - the serialized dataResumableFileUploadpublic ResumableFileUpload.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<ResumableFileUpload.Builder,ResumableFileUpload>Copyright © 2023. All rights reserved.