Package fr.ifremer.isisfish.util.ftp
Class FtpManager
java.lang.Object
fr.ifremer.isisfish.util.ftp.FtpManager
It's seams that it's not possible to use mutiple ftp connection to the same server. So this manager
will handle only one connection for all application.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
L'identifiant de la session ouverte.protected org.apache.commons.net.ftp.FTPClient
protected static FtpManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static long
getFileSize
(org.apache.commons.net.ftp.FTPClient ftpClient, String remotePath) org.apache.commons.net.ftp.FTPClient
getFtpClient
(String host, int port, String login, String password) static FtpManager
protected org.apache.commons.net.ftp.FTPClient
openFtpClient
(String host, int port, String login, String password)
-
Field Details
-
instance
-
currentKey
L'identifiant de la session ouverte. Forme : login:password@host:port Si l'identifiant change, la précédente session est fermé et une autre et réouverte. -
currentSession
protected org.apache.commons.net.ftp.FTPClient currentSession
-
-
Constructor Details
-
FtpManager
public FtpManager()
-
-
Method Details
-
getInstance
-
getFtpClient
public org.apache.commons.net.ftp.FTPClient getFtpClient(String host, int port, String login, String password) throws IOException - Throws:
IOException
-
openFtpClient
protected org.apache.commons.net.ftp.FTPClient openFtpClient(String host, int port, String login, String password) throws IOException - Throws:
IOException
-
closeFtpClient
- Throws:
IOException
-
getFileSize
public static long getFileSize(org.apache.commons.net.ftp.FTPClient ftpClient, String remotePath) throws IOException - Throws:
IOException
-