Package com.sshtools.client.tasks
Class DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder
java.lang.Object
com.sshtools.client.tasks.AbstractConnectionTask.AbstractConnectionTaskBuilder<B,T>
com.sshtools.client.tasks.AbstractFileTask.AbstractFileTaskBuilder<DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder,DownloadOutputStreamTask>
com.sshtools.client.tasks.DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder
- Enclosing class:
- DownloadOutputStreamTask
public static final class DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder
extends AbstractFileTask.AbstractFileTaskBuilder<DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder,DownloadOutputStreamTask>
Builder for
DownloadOutputStreamTask
.-
Field Summary
Fields inherited from class com.sshtools.client.tasks.AbstractConnectionTask.AbstractConnectionTaskBuilder
clientSupplier, connection
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
create()
withOutputStream
(OutputStream outputStream) Set the output stream to download to.withOutputStream
(Optional<OutputStream> outputStream) Set the output stream to download to.withRemote
(Path remote) Set the remote remote of the local to download.withRemote
(Optional<Path> remote) Set the remote remote of the local to download.withRemotePath
(String remote) Set the remote remote of the local to download.withRemotePath
(Optional<String> remote) Set the remote remote of the local to download.Methods inherited from class com.sshtools.client.tasks.AbstractFileTask.AbstractFileTaskBuilder
withProgress, withProgress
Methods inherited from class com.sshtools.client.tasks.AbstractConnectionTask.AbstractConnectionTaskBuilder
withClient, withClients, withConnection
-
Method Details
-
create
- Returns:
- builder
-
withOutputStream
public DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder withOutputStream(Optional<OutputStream> outputStream) Set the output stream to download to. If empty, will be download the current local working directory, with the same name as the remote file.- Parameters:
file
- file- Returns:
- builder for chaining
-
withOutputStream
public DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder withOutputStream(OutputStream outputStream) Set the output stream to download to.- Parameters:
file
- file- Returns:
- builder for chaining
-
withRemotePath
public DownloadOutputStreamTask.DownloadOutputStreamTaskBuilder withRemotePath(Optional<String> remote) Set the remote remote of the local to download.- Parameters:
remote
- remote remote- Returns:
- builder for chaining
-
withRemote
Set the remote remote of the local to download.- Parameters:
remote
- remote remote- Returns:
- builder for chaining
-
withRemote
Set the remote remote of the local to download.- Parameters:
remote
- remote remote- Returns:
- builder for chaining
-
withRemotePath
Set the remote remote of the local to download.- Parameters:
remote
- remote remote- Returns:
- builder for chaining
-
build
-