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 useDownloadFileRequest
instead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DownloadRequest.TypedBuilder<T>
The type-parameterized version ofDownloadRequest.UntypedBuilder
.static interface
DownloadRequest.UntypedBuilder
Initial 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.UntypedBuilder
builder()
Creates a builder that can be used to create aDownloadRequest
.boolean
equals(Object o)
GetObjectRequest
getObjectRequest()
int
hashCode()
AsyncResponseTransformer<GetObjectResponse,ReturnT>
responseTransformer()
ThePath
to file that response contents will be written to.DownloadRequest.TypedBuilder<ReturnT>
toBuilder()
String
toString()
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:
toBuilder
in interfaceToCopyableBuilder<DownloadRequest.TypedBuilder<ReturnT>,DownloadRequest<ReturnT>>
-
responseTransformer
public AsyncResponseTransformer<GetObjectResponse,ReturnT> responseTransformer()
ThePath
to 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
GetObjectRequest
request that should be used for the download
-
transferListeners
public List<TransferListener> transferListeners()
- Specified by:
transferListeners
in interfaceTransferObjectRequest
- Returns:
- the List of transferListeners.
- See Also:
DownloadRequest.TypedBuilder.transferListeners(Collection)
-
-