Package org.apache.sshd.scp.client
Interface ScpClient
- All Superinterfaces:
ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
- All Known Subinterfaces:
CloseableScpClient
- All Known Implementing Classes:
AbstractScpClient
,DefaultScpClient
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilder
appendCommandOption
(StringBuilder sb, Collection<ScpClient.Option> options, ScpClient.Option opt) Appends the specified option command value if appears in provided options collectionstatic String
createReceiveCommand
(String remote, Collection<ScpClient.Option> options) static String
createSendCommand
(String remote, Collection<ScpClient.Option> options) void
download
(String[] remote, String local, Collection<ScpClient.Option> options) default void
download
(String[] remote, String local, ScpClient.Option... options) void
download
(String[] remote, Path local, Collection<ScpClient.Option> options) default void
download
(String[] remote, Path local, ScpClient.Option... options) void
download
(String remote, OutputStream local) void
download
(String remote, String local, Collection<ScpClient.Option> options) default void
download
(String remote, String local, ScpClient.Option... options) void
download
(String remote, Path local, Collection<ScpClient.Option> options) default void
download
(String remote, Path local, ScpClient.Option... options) default byte[]
downloadBytes
(String remote) default ClientSession
default void
upload
(byte[] data, int offset, int len, String remote, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) default void
upload
(byte[] data, String remote, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) void
upload
(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) void
upload
(String[] local, String remote, Collection<ScpClient.Option> options) default void
upload
(String[] local, String remote, ScpClient.Option... options) default void
upload
(String local, String remote, Collection<ScpClient.Option> options) default void
upload
(String local, String remote, ScpClient.Option... options) void
upload
(Path[] local, String remote, Collection<ScpClient.Option> options) default void
upload
(Path[] local, String remote, ScpClient.Option... options) default void
upload
(Path local, String remote, Collection<ScpClient.Option> options) default void
upload
(Path local, String remote, ScpClient.Option... options) Methods inherited from interface org.apache.sshd.client.session.ClientSessionHolder
getClientSession
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Method Details
-
getSession
- Specified by:
getSession
in interfaceSessionHolder<ClientSession>
-
download
- Throws:
IOException
-
download
- Throws:
IOException
-
download
- Throws:
IOException
-
download
- Throws:
IOException
-
download
- Throws:
IOException
-
downloadBytes
- Throws:
IOException
-
download
default void download(String[] remote, String local, ScpClient.Option... options) throws IOException - Throws:
IOException
-
download
- Throws:
IOException
-
download
void download(String[] remote, String local, Collection<ScpClient.Option> options) throws IOException - Throws:
IOException
-
download
- Throws:
IOException
-
upload
- Throws:
IOException
-
upload
default void upload(String local, String remote, Collection<ScpClient.Option> options) throws IOException - Throws:
IOException
-
upload
- Throws:
IOException
-
upload
default void upload(Path local, String remote, Collection<ScpClient.Option> options) throws IOException - Throws:
IOException
-
upload
- Throws:
IOException
-
upload
- Throws:
IOException
-
upload
- Throws:
IOException
-
upload
- Throws:
IOException
-
upload
default void upload(byte[] data, String remote, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) throws IOException - Throws:
IOException
-
upload
default void upload(byte[] data, int offset, int len, String remote, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) throws IOException - Throws:
IOException
-
upload
void upload(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) throws IOException - Throws:
IOException
-
createSendCommand
-
createReceiveCommand
-
appendCommandOption
static StringBuilder appendCommandOption(StringBuilder sb, Collection<ScpClient.Option> options, ScpClient.Option opt) Appends the specified option command value if appears in provided options collection- Parameters:
sb
- TheStringBuilder
targetoptions
- The command options - ignored ifnull
opt
- The required option- Returns:
- The updated builder
-