public class FtpSession
extends java.lang.Object
implements org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>
Session for FTP.| Constructor and Description |
|---|
FtpSession(org.apache.commons.net.ftp.FTPClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(java.io.InputStream inputStream,
java.lang.String path) |
void |
close() |
boolean |
exists(java.lang.String path) |
boolean |
finalizeRaw() |
org.apache.commons.net.ftp.FTPClient |
getClientInstance() |
boolean |
isOpen() |
org.apache.commons.net.ftp.FTPFile[] |
list(java.lang.String path) |
java.lang.String[] |
listNames(java.lang.String path) |
boolean |
mkdir(java.lang.String remoteDirectory) |
void |
read(java.lang.String path,
java.io.OutputStream fos) |
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 directory) |
void |
write(java.io.InputStream inputStream,
java.lang.String path) |
public boolean remove(java.lang.String path)
throws java.io.IOException
remove in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic org.apache.commons.net.ftp.FTPFile[] list(java.lang.String path)
throws java.io.IOException
list in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>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<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic void read(java.lang.String path,
java.io.OutputStream fos)
throws java.io.IOException
read in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>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<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic boolean finalizeRaw()
throws java.io.IOException
finalizeRaw in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic void write(java.io.InputStream inputStream,
java.lang.String path)
throws java.io.IOException
write in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic void append(java.io.InputStream inputStream,
java.lang.String path)
throws java.io.IOException
append in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>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<org.apache.commons.net.ftp.FTPFile>public boolean isOpen()
isOpen in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>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<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic boolean mkdir(java.lang.String remoteDirectory)
throws java.io.IOException
mkdir in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic boolean rmdir(java.lang.String directory)
throws java.io.IOException
rmdir in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic boolean exists(java.lang.String path)
throws java.io.IOException
exists in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>java.io.IOExceptionpublic org.apache.commons.net.ftp.FTPClient getClientInstance()
getClientInstance in interface org.springframework.integration.file.remote.session.Session<org.apache.commons.net.ftp.FTPFile>