public class SftpSession
extends java.lang.Object
implements org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
Session
implementation. Wraps a JSCH session instance.Constructor and Description |
---|
SftpSession(org.springframework.integration.sftp.session.JSchSessionWrapper wrapper) |
SftpSession(com.jcraft.jsch.Session jschSession) |
Modifier and Type | Method and Description |
---|---|
void |
append(java.io.InputStream inputStream,
java.lang.String destination) |
void |
close() |
boolean |
exists(java.lang.String path) |
boolean |
finalizeRaw() |
com.jcraft.jsch.ChannelSftp |
getClientInstance() |
boolean |
isOpen() |
com.jcraft.jsch.ChannelSftp.LsEntry[] |
list(java.lang.String path) |
java.lang.String[] |
listNames(java.lang.String path) |
boolean |
mkdir(java.lang.String remoteDirectory) |
void |
read(java.lang.String source,
java.io.OutputStream os) |
java.io.InputStream |
readRaw(java.lang.String source) |
boolean |
remove(java.lang.String path) |
void |
rename(java.lang.String pathFrom,
java.lang.String pathTo) |
boolean |
rmdir(java.lang.String remoteDirectory) |
void |
write(java.io.InputStream inputStream,
java.lang.String destination) |
public SftpSession(com.jcraft.jsch.Session jschSession)
public SftpSession(org.springframework.integration.sftp.session.JSchSessionWrapper wrapper)
public boolean remove(java.lang.String path) throws java.io.IOException
remove
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public com.jcraft.jsch.ChannelSftp.LsEntry[] list(java.lang.String path) throws java.io.IOException
list
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public java.lang.String[] listNames(java.lang.String path) throws java.io.IOException
listNames
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public void read(java.lang.String source, java.io.OutputStream os) throws java.io.IOException
read
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public java.io.InputStream readRaw(java.lang.String source) throws java.io.IOException
readRaw
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public boolean finalizeRaw() throws java.io.IOException
finalizeRaw
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public void write(java.io.InputStream inputStream, java.lang.String destination) throws java.io.IOException
write
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public void append(java.io.InputStream inputStream, java.lang.String destination) throws java.io.IOException
append
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public void close()
close
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
public boolean isOpen()
isOpen
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
public void rename(java.lang.String pathFrom, java.lang.String pathTo) throws java.io.IOException
rename
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public boolean mkdir(java.lang.String remoteDirectory) throws java.io.IOException
mkdir
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public boolean rmdir(java.lang.String remoteDirectory) throws java.io.IOException
rmdir
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
java.io.IOException
public boolean exists(java.lang.String path)
exists
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>
public com.jcraft.jsch.ChannelSftp getClientInstance()
getClientInstance
in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>