public class FtpDownloader
extends java.lang.Object
| Constructor and Description |
|---|
FtpDownloader(java.lang.String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.commons.net.ftp.FTPClient |
getClient() |
java.lang.String |
getHost() |
int |
getPort() |
boolean |
isConnected() |
java.util.LinkedHashMap<java.lang.String,org.apache.commons.net.ftp.FTPFile> |
listDirectory(java.lang.String path) |
java.util.LinkedHashMap<org.apache.commons.net.ftp.FTPFile,java.lang.String> |
listLogs() |
static void |
main(java.lang.String[] args) |
void |
renewClient() |
void |
renewClient(java.lang.String username,
java.lang.String password) |
void |
setHostAndPort(java.lang.String host,
int port) |
public FtpDownloader(java.lang.String host,
int port)
throws java.lang.Exception
java.lang.Exceptionpublic void renewClient()
throws java.net.SocketException,
java.io.IOException
java.net.SocketExceptionjava.io.IOExceptionpublic void renewClient(java.lang.String username,
java.lang.String password)
throws java.net.SocketException,
java.io.IOException
java.net.SocketExceptionjava.io.IOExceptionpublic java.lang.String getHost()
public int getPort()
public void setHostAndPort(java.lang.String host,
int port)
host - the host to setpublic java.util.LinkedHashMap<java.lang.String,org.apache.commons.net.ftp.FTPFile> listDirectory(java.lang.String path)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.LinkedHashMap<org.apache.commons.net.ftp.FTPFile,java.lang.String> listLogs()
throws java.io.IOException
java.io.IOExceptionpublic org.apache.commons.net.ftp.FTPClient getClient()
public boolean isConnected()
public void close()
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.