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 StringBuilderappendCommandOption(StringBuilder sb, Collection<ScpClient.Option> options, ScpClient.Option opt) Appends the specified option command value if appears in provided options collectionstatic StringcreateReceiveCommand(String remote, Collection<ScpClient.Option> options) static StringcreateSendCommand(String remote, Collection<ScpClient.Option> options) voiddownload(String[] remote, String local, Collection<ScpClient.Option> options) default voiddownload(String[] remote, String local, ScpClient.Option... options) voiddownload(String[] remote, Path local, Collection<ScpClient.Option> options) default voiddownload(String[] remote, Path local, ScpClient.Option... options) voiddownload(String remote, OutputStream local) voiddownload(String remote, String local, Collection<ScpClient.Option> options) default voiddownload(String remote, String local, ScpClient.Option... options) voiddownload(String remote, Path local, Collection<ScpClient.Option> options) default voiddownload(String remote, Path local, ScpClient.Option... options) default byte[]downloadBytes(String remote) default ClientSessiondefault voidupload(byte[] data, int offset, int len, String remote, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) default voidupload(byte[] data, String remote, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) voidupload(InputStream local, String remote, long size, Collection<PosixFilePermission> perms, ScpTimestampCommandDetails time) voidupload(String[] local, String remote, Collection<ScpClient.Option> options) default voidupload(String[] local, String remote, ScpClient.Option... options) default voidupload(String local, String remote, Collection<ScpClient.Option> options) default voidupload(String local, String remote, ScpClient.Option... options) voidupload(Path[] local, String remote, Collection<ScpClient.Option> options) default voidupload(Path[] local, String remote, ScpClient.Option... options) default voidupload(Path local, String remote, Collection<ScpClient.Option> options) default voidupload(Path local, String remote, ScpClient.Option... options) Methods inherited from interface org.apache.sshd.client.session.ClientSessionHolder
getClientSessionMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Method Details
-
getSession
- Specified by:
getSessionin 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- TheStringBuildertargetoptions- The command options - ignored ifnullopt- The required option- Returns:
- The updated builder
-