Class FtpDownloader
- java.lang.Object
-
- org.esa.snap.core.dataop.downloadable.FtpDownloader
-
public final class FtpDownloader extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FtpDownloader.FTPError
-
Constructor Summary
Constructors Constructor Description FtpDownloader(String server)
FtpDownloader(String server, String user, String password)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disconnect()
static long
getFileSize(org.apache.commons.net.ftp.FTPFile[] fileList, String remoteFileName)
static Map<String,Long>
readRemoteFileList(FtpDownloader ftp, String server, String remotePath)
Map<String,Long>
readRemoteFileListNoCache(String remotePath)
FtpDownloader.FTPError
retrieveFile(String remotePath, File localFile, Long fileSize)
static boolean
testFTP(String remoteFTP, String remotePath)
-
-
-
Constructor Detail
-
FtpDownloader
public FtpDownloader(String server) throws IOException
- Throws:
IOException
-
FtpDownloader
public FtpDownloader(String server, String user, String password) throws IOException
- Throws:
IOException
-
-
Method Detail
-
disconnect
public void disconnect() throws IOException
- Throws:
IOException
-
retrieveFile
public FtpDownloader.FTPError retrieveFile(String remotePath, File localFile, Long fileSize) throws Exception
- Throws:
Exception
-
getFileSize
public static long getFileSize(org.apache.commons.net.ftp.FTPFile[] fileList, String remoteFileName)
-
readRemoteFileList
public static Map<String,Long> readRemoteFileList(FtpDownloader ftp, String server, String remotePath)
-
testFTP
public static boolean testFTP(String remoteFTP, String remotePath) throws IOException
- Throws:
IOException
-
-