public class FtpClient
extends java.lang.Object
implements java.lang.AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
FtpClient.Builder |
static class |
FtpClient.FileNameFilter |
static class |
FtpClient.RemoteFile |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deleteFile(java.lang.String dir,
java.lang.String file) |
org.apache.commons.net.ftp.FTPFile[] |
listFiles(java.lang.String dir,
FtpClient.FileNameFilter filter) |
byte[] |
readFile(java.lang.String dir,
java.lang.String file) |
void |
writeFile(java.lang.String dir,
java.lang.String file,
byte[] data) |
public org.apache.commons.net.ftp.FTPFile[] listFiles(java.lang.String dir,
FtpClient.FileNameFilter filter)
throws org.apache.commons.net.ftp.FTPConnectionClosedException,
java.io.IOException
dir - filter - org.apache.commons.net.ftp.FTPConnectionClosedExceptionjava.io.IOExceptionpublic byte[] readFile(java.lang.String dir,
java.lang.String file)
throws org.apache.commons.net.ftp.FTPConnectionClosedException,
java.io.IOException
dir - file - org.apache.commons.net.ftp.FTPConnectionClosedExceptionjava.io.IOExceptionpublic void writeFile(java.lang.String dir,
java.lang.String file,
byte[] data)
throws org.apache.commons.net.ftp.FTPConnectionClosedException,
java.io.IOException
dir - file - data - org.apache.commons.net.ftp.FTPConnectionClosedExceptionjava.io.IOExceptionpublic void deleteFile(java.lang.String dir,
java.lang.String file)
throws org.apache.commons.net.ftp.FTPConnectionClosedException,
java.io.IOException
dir - file - org.apache.commons.net.ftp.FTPConnectionClosedExceptionjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseablejava.io.IOException