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.FTPConnectionClosedException
java.io.IOException
public 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.FTPConnectionClosedException
java.io.IOException
public 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.FTPConnectionClosedException
java.io.IOException
public 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.FTPConnectionClosedException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException