Interface DownloadFileRequest.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<DownloadFileRequest.Builder,DownloadFileRequest>,SdkBuilder<DownloadFileRequest.Builder,DownloadFileRequest>
- Enclosing class:
- DownloadFileRequest
@NotThreadSafe public static interface DownloadFileRequest.Builder extends CopyableBuilder<DownloadFileRequest.Builder,DownloadFileRequest>
A builder for aDownloadFileRequest, created withDownloadFileRequest.builder()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DownloadFileRequest.BuilderaddTransferListener(TransferListener transferListener)Add aTransferListenerthat will be notified as part of this request.default DownloadFileRequest.Builderdestination(File destination)The file that response contents will be written to.DownloadFileRequest.Builderdestination(Path destination)ThePathto file that response contents will be written to.default DownloadFileRequest.BuildergetObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder)TheGetObjectRequestrequest that should be used for the downloadDownloadFileRequest.BuildergetObjectRequest(GetObjectRequest getObjectRequest)TheGetObjectRequestrequest that should be used for the downloadDownloadFileRequest.BuildertransferListeners(Collection<TransferListener> transferListeners)TheTransferListeners that will be notified as part of this request.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
-
-
-
Method Detail
-
destination
DownloadFileRequest.Builder destination(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.- Parameters:
destination- the destination path- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
destination
default DownloadFileRequest.Builder destination(File destination)
The 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.- Parameters:
destination- the destination path- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getObjectRequest
DownloadFileRequest.Builder getObjectRequest(GetObjectRequest getObjectRequest)
TheGetObjectRequestrequest that should be used for the download- Parameters:
getObjectRequest- the getObject request- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
getObjectRequest(Consumer)
-
getObjectRequest
default DownloadFileRequest.Builder getObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder)
TheGetObjectRequestrequest that should be used for the downloadThis is a convenience method that creates an instance of the
GetObjectRequestbuilder avoiding the need to create one manually viaGetObjectRequest.builder().- Parameters:
getObjectRequestBuilder- the getObject request- Returns:
- a reference to this object so that method calls can be chained together.
- See Also:
getObjectRequest(GetObjectRequest)
-
transferListeners
DownloadFileRequest.Builder transferListeners(Collection<TransferListener> transferListeners)
TheTransferListeners that will be notified as part of this request. This method overrides and replaces any transferListeners that have already been set. Add an optional request override configuration.- Parameters:
transferListeners- the collection of transferListeners- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TransferListener
-
addTransferListener
DownloadFileRequest.Builder addTransferListener(TransferListener transferListener)
Add aTransferListenerthat will be notified as part of this request.- Parameters:
transferListener- the transferListener to add- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TransferListener
-
-