Class DownloadFileRequest
- java.lang.Object
-
- software.amazon.awssdk.transfer.s3.model.DownloadFileRequest
-
- All Implemented Interfaces:
TransferObjectRequest,TransferRequest,ToCopyableBuilder<DownloadFileRequest.Builder,DownloadFileRequest>
public final class DownloadFileRequest extends Object implements TransferObjectRequest, ToCopyableBuilder<DownloadFileRequest.Builder,DownloadFileRequest>
Download an object identified by the bucket and key from S3 to a local file. For non-file-based downloads, you may useDownloadRequestinstead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDownloadFileRequest.BuilderA builder for aDownloadFileRequest, created withbuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DownloadFileRequest.Builderbuilder()Creates a builder that can be used to create aDownloadFileRequest.Pathdestination()ThePathto file that response contents will be written to.booleanequals(Object o)GetObjectRequestgetObjectRequest()inthashCode()static Class<? extends DownloadFileRequest.Builder>serializableBuilderClass()DownloadFileRequest.BuildertoBuilder()StringtoString()List<TransferListener>transferListeners()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
builder
public static DownloadFileRequest.Builder builder()
Creates a builder that can be used to create aDownloadFileRequest.
-
toBuilder
public DownloadFileRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<DownloadFileRequest.Builder,DownloadFileRequest>
-
destination
public Path destination()
ThePathto file that response contents will be written to. The file must not exist or this method will throw an exception. If the file is not writable by the current user then an exception will be thrown.- Returns:
- the destination path
-
getObjectRequest
public GetObjectRequest getObjectRequest()
- Returns:
- The
GetObjectRequestrequest that should be used for the download
-
transferListeners
public List<TransferListener> transferListeners()
- Specified by:
transferListenersin interfaceTransferObjectRequest- Returns:
- List of
TransferListeners that will be notified as part of this request.
-
serializableBuilderClass
public static Class<? extends DownloadFileRequest.Builder> serializableBuilderClass()
-
-