Package com.sshtools.client.tasks
Class UploadFileContentTask.UploadFileContentTaskBuilder
java.lang.Object
com.sshtools.client.tasks.AbstractConnectionTask.AbstractConnectionTaskBuilder<B,T>
com.sshtools.client.tasks.AbstractFileTask.AbstractFileTaskBuilder<UploadFileContentTask.UploadFileContentTaskBuilder,UploadFileContentTask>
com.sshtools.client.tasks.UploadFileContentTask.UploadFileContentTaskBuilder
- Enclosing class:
- UploadFileContentTask
public static final class UploadFileContentTask.UploadFileContentTaskBuilder
extends AbstractFileTask.AbstractFileTaskBuilder<UploadFileContentTask.UploadFileContentTaskBuilder,UploadFileContentTask>
Builder for
UploadFileContentTask
.-
Field Summary
Fields inherited from class com.sshtools.client.tasks.AbstractConnectionTask.AbstractConnectionTaskBuilder
clientSupplier, connection
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
create()
Create a newUploadFileContentTask.UploadFileContentTaskBuilder
withContent
(Object content) Set theObject
to upload.withEncoding
(String encoding) Set the character encoding to use for transferring the string content.withEncoding
(Charset encoding) Set the character encoding to use for transferring the string content.withRemote
(Path remote) Set the remote path to upload the file to.withRemote
(Optional<Path> remote) Set the remote path to upload the file to.withRemotePath
(String remote) Set the remote path to upload the file to.withRemotePath
(Optional<String> remote) Set the remote path to upload the file to.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
Create a newUploadFileContentTask.UploadFileContentTaskBuilder
- Returns:
- builder
-
withEncoding
Set the character encoding to use for transferring the string content.- Parameters:
encoding
- encoding- Returns:
- builder for chaining
-
withEncoding
Set the character encoding to use for transferring the string content.- Parameters:
encoding
- encoding- Returns:
- builder for chaining
-
withRemotePath
Set the remote path to upload the file to. If empty, will be uploaded the current remote working directory- Parameters:
remote
- remote path- Returns:
- builder for chaining
-
withRemote
Set the remote path to upload the file to. If empty, will be uploaded the current remote working directory- Parameters:
remote
- remote path- Returns:
- builder for chaining
-
withRemote
Set the remote path to upload the file to. If empty, will be uploaded the current remote working directory- Parameters:
remote
- remote path- Returns:
- builder for chaining
-
withRemotePath
Set the remote path to upload the file to. If empty, will be uploaded the current remote working directory- Parameters:
remote
- remote path- Returns:
- builder for chaining
-
withContent
Set theObject
to upload. The object will simple be deserialized usingObject.toString()
. This is required.- Parameters:
content
- content- Returns:
- builder for chaining
-
build
-