Class DownloadRequest<ReturnT>
- java.lang.Object
-
- software.amazon.awssdk.transfer.s3.model.DownloadRequest<ReturnT>
-
- All Implemented Interfaces:
TransferObjectRequest,TransferRequest,ToCopyableBuilder<DownloadRequest.TypedBuilder<ReturnT>,DownloadRequest<ReturnT>>
public final class DownloadRequest<ReturnT> extends Object implements TransferObjectRequest, ToCopyableBuilder<DownloadRequest.TypedBuilder<ReturnT>,DownloadRequest<ReturnT>>
Represents the request to download an object identified by the bucket and key from S3 through the givenAsyncResponseTransformer. For downloading to a file, you may useDownloadFileRequestinstead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDownloadRequest.TypedBuilder<T>The type-parameterized version ofDownloadRequest.UntypedBuilder.static interfaceDownloadRequest.UntypedBuilderInitial calls tobuilder()return anDownloadRequest.UntypedBuilder, where the builder is not yet parameterized with the generic type associated withDownloadRequest.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DownloadRequest.UntypedBuilderbuilder()Creates a builder that can be used to create aDownloadRequest.booleanequals(Object o)GetObjectRequestgetObjectRequest()inthashCode()AsyncResponseTransformer<GetObjectResponse,ReturnT>responseTransformer()ThePathto file that response contents will be written to.DownloadRequest.TypedBuilder<ReturnT>toBuilder()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 DownloadRequest.UntypedBuilder builder()
Creates a builder that can be used to create aDownloadRequest.- See Also:
DownloadRequest.UntypedBuilder
-
toBuilder
public DownloadRequest.TypedBuilder<ReturnT> toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<DownloadRequest.TypedBuilder<ReturnT>,DownloadRequest<ReturnT>>
-
responseTransformer
public AsyncResponseTransformer<GetObjectResponse,ReturnT> responseTransformer()
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:
- the List of transferListeners.
- See Also:
DownloadRequest.TypedBuilder.transferListeners(Collection)
-
-