Package org.apache.sshd.scp.client
Interface ScpClient
-
- All Superinterfaces:
ClientSessionHolder
,SessionContextHolder
,SessionHolder<ClientSession>
- All Known Subinterfaces:
CloseableScpClient
- All Known Implementing Classes:
AbstractScpClient
,DefaultScpClient
public interface ScpClient extends SessionHolder<ClientSession>, ClientSessionHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ScpClient.Option
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static java.lang.StringBuilder
appendCommandOption(java.lang.StringBuilder sb, java.util.Collection<ScpClient.Option> options, ScpClient.Option opt)
Appends the specified option command value if appears in provided options collectionstatic java.lang.String
createReceiveCommand(java.lang.String remote, java.util.Collection<ScpClient.Option> options)
static java.lang.String
createSendCommand(java.lang.String remote, java.util.Collection<ScpClient.Option> options)
void
download(java.lang.String[] remote, java.lang.String local, java.util.Collection<ScpClient.Option> options)
default void
download(java.lang.String[] remote, java.lang.String local, ScpClient.Option... options)
void
download(java.lang.String[] remote, java.nio.file.Path local, java.util.Collection<ScpClient.Option> options)
default void
download(java.lang.String[] remote, java.nio.file.Path local, ScpClient.Option... options)
void
download(java.lang.String remote, java.io.OutputStream local)
void
download(java.lang.String remote, java.lang.String local, java.util.Collection<ScpClient.Option> options)
default void
download(java.lang.String remote, java.lang.String local, ScpClient.Option... options)
void
download(java.lang.String remote, java.nio.file.Path local, java.util.Collection<ScpClient.Option> options)
default void
download(java.lang.String remote, java.nio.file.Path local, ScpClient.Option... options)
default byte[]
downloadBytes(java.lang.String remote)
default ClientSession
getSession()
default void
upload(byte[] data, int offset, int len, java.lang.String remote, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time)
default void
upload(byte[] data, java.lang.String remote, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time)
void
upload(java.io.InputStream local, java.lang.String remote, long size, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time)
void
upload(java.lang.String[] local, java.lang.String remote, java.util.Collection<ScpClient.Option> options)
default void
upload(java.lang.String[] local, java.lang.String remote, ScpClient.Option... options)
default void
upload(java.lang.String local, java.lang.String remote, java.util.Collection<ScpClient.Option> options)
default void
upload(java.lang.String local, java.lang.String remote, ScpClient.Option... options)
void
upload(java.nio.file.Path[] local, java.lang.String remote, java.util.Collection<ScpClient.Option> options)
default void
upload(java.nio.file.Path[] local, java.lang.String remote, ScpClient.Option... options)
default void
upload(java.nio.file.Path local, java.lang.String remote, java.util.Collection<ScpClient.Option> options)
default void
upload(java.nio.file.Path local, java.lang.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 Detail
-
getSession
default ClientSession getSession()
- Specified by:
getSession
in interfaceSessionHolder<ClientSession>
-
download
default void download(java.lang.String remote, java.lang.String local, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
void download(java.lang.String remote, java.lang.String local, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
default void download(java.lang.String remote, java.nio.file.Path local, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
void download(java.lang.String remote, java.nio.file.Path local, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
void download(java.lang.String remote, java.io.OutputStream local) throws java.io.IOException
- Throws:
java.io.IOException
-
downloadBytes
default byte[] downloadBytes(java.lang.String remote) throws java.io.IOException
- Throws:
java.io.IOException
-
download
default void download(java.lang.String[] remote, java.lang.String local, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
default void download(java.lang.String[] remote, java.nio.file.Path local, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
void download(java.lang.String[] remote, java.lang.String local, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
download
void download(java.lang.String[] remote, java.nio.file.Path local, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(java.lang.String local, java.lang.String remote, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(java.lang.String local, java.lang.String remote, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(java.nio.file.Path local, java.lang.String remote, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(java.nio.file.Path local, java.lang.String remote, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(java.lang.String[] local, java.lang.String remote, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
void upload(java.lang.String[] local, java.lang.String remote, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(java.nio.file.Path[] local, java.lang.String remote, ScpClient.Option... options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
void upload(java.nio.file.Path[] local, java.lang.String remote, java.util.Collection<ScpClient.Option> options) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(byte[] data, java.lang.String remote, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
default void upload(byte[] data, int offset, int len, java.lang.String remote, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
void upload(java.io.InputStream local, java.lang.String remote, long size, java.util.Collection<java.nio.file.attribute.PosixFilePermission> perms, ScpTimestampCommandDetails time) throws java.io.IOException
- Throws:
java.io.IOException
-
createSendCommand
static java.lang.String createSendCommand(java.lang.String remote, java.util.Collection<ScpClient.Option> options)
-
createReceiveCommand
static java.lang.String createReceiveCommand(java.lang.String remote, java.util.Collection<ScpClient.Option> options)
-
appendCommandOption
static java.lang.StringBuilder appendCommandOption(java.lang.StringBuilder sb, java.util.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
-
-