public class SwitchCommanderCollectorFileHandler
extends java.lang.Object
| Constructor and Description |
|---|
SwitchCommanderCollectorFileHandler(java.lang.String hostName,
java.lang.String userName,
java.lang.String password,
java.lang.String localPath,
java.lang.String remotePath) |
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<java.lang.String> |
getFTPFile(java.util.ArrayList<java.lang.String> fileList)
TODO Retrieves files through FTP
|
java.lang.String |
getRemoteFile(java.lang.String fileName)
This method performs the actual ftp to fetch the remote file.
|
boolean |
isLatestFile(FileNameProperty fileNameProp,
java.util.HashMap<java.lang.String,FileNameProperty> fileMap) |
public SwitchCommanderCollectorFileHandler(java.lang.String hostName,
java.lang.String userName,
java.lang.String password,
java.lang.String localPath,
java.lang.String remotePath)
public java.lang.String getRemoteFile(java.lang.String fileName)
throws java.net.MalformedURLException,
java.io.IOException
hostName - The ftp serveruser - The ftp userpassword - The ftp passwordfileName - The absolute filename to be fetched from the remote locationlocalDir - The local directory where the file to be placedjava.net.MalformedURLExceptionjava.io.IOExceptionpublic java.util.ArrayList<java.lang.String> getFTPFile(java.util.ArrayList<java.lang.String> fileList)
fileList - List of location of remote files to be downloadedsize - The number of files to be retrievedpublic boolean isLatestFile(FileNameProperty fileNameProp, java.util.HashMap<java.lang.String,FileNameProperty> fileMap)
fileNameProp - The file to be tested if it's the latest