public final class ResumableFileDownload extends Object implements ResumableTransfer, ToCopyableBuilder<ResumableFileDownload.Builder,ResumableFileDownload>
Serialization: When serializing this token, the following structures will not be preserved/persisted:
| Modifier and Type | Class and Description |
|---|---|
static interface |
ResumableFileDownload.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ResumableFileDownload.Builder |
builder() |
long |
bytesTransferred()
Retrieve the number of bytes that have been transferred.
|
DownloadFileRequest |
downloadFileRequest() |
boolean |
equals(Object o) |
Instant |
fileLastModified()
Last modified time of the file since last pause
|
static ResumableFileDownload |
fromBytes(SdkBytes bytes)
Deserialize bytes with JSON data into a
ResumableFileDownload. |
static ResumableFileDownload |
fromFile(Path path)
Deserialize data at the given path into a
ResumableFileDownload. |
static ResumableFileDownload |
fromString(String contents)
Deserialize a string with JSON data into a
ResumableFileDownload. |
int |
hashCode() |
Optional<Instant> |
s3ObjectLastModified()
Last modified time of the S3 object since last pause, or
Optional.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.
|
ResumableFileDownload.Builder |
toBuilder() |
String |
toString() |
OptionalLong |
totalSizeInBytes()
The total size of the transfer in bytes or
OptionalLong.empty() if unknown |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic static ResumableFileDownload.Builder builder()
public DownloadFileRequest downloadFileRequest()
DownloadFileRequest to resumepublic long bytesTransferred()
public Optional<Instant> s3ObjectLastModified()
Optional.empty() if unknownpublic Instant fileLastModified()
public OptionalLong totalSizeInBytes()
OptionalLong.empty() if unknownpublic void serializeToFile(Path path)
serializeToFile in interface ResumableTransferpath - The path to the file to which you want to write the serialized download object.public void serializeToOutputStream(OutputStream outputStream)
OutputStream is not closed or flushed after writing.serializeToOutputStream in interface ResumableTransferoutputStream - The output stream to write the serialized object to.public String serializeToString()
serializeToString in interface ResumableTransferpublic SdkBytes serializeToBytes()
SdkBytes object.serializeToBytes in interface ResumableTransferSdkBytespublic InputStream serializeToInputStream()
InputStream.serializeToInputStream in interface ResumableTransferpublic static ResumableFileDownload fromFile(Path path)
ResumableFileDownload.path - The Path to the file with serialized dataResumableFileDownloadpublic static ResumableFileDownload fromBytes(SdkBytes bytes)
ResumableFileDownload.bytes - the serialized dataResumableFileDownloadpublic static ResumableFileDownload fromString(String contents)
ResumableFileDownload.contents - the serialized dataResumableFileDownloadpublic ResumableFileDownload.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<ResumableFileDownload.Builder,ResumableFileDownload>Copyright © 2023. All rights reserved.