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.IOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic boolean finalizeRaw()
throws java.io.IOException
finalizeRaw in interface org.springframework.integration.file.remote.session.Session<com.jcraft.jsch.ChannelSftp.LsEntry>java.io.IOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose 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.IOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic 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>