public class FtpTestFileService extends AbstractTestFileService
AbstractTestFileService
.Constructor and Description |
---|
FtpTestFileService(FileDataService fileDataService,
String localDir,
String ftpHost,
int ftpPort,
String ftpUsername,
String ftpPassword,
String ftpPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
downloadRemoteFile(FileData fileData,
File localFile)
Download the file represented from the remote location to the local file.
|
protected String |
getMirrorPath()
|
protected List<FileData> |
listRemoteFiles()
Does a listing of files on the FTP server
|
void |
setFtpLocalPassiveMode(boolean ftpLocalPassiveMode)
Force the FTP client to
enter local passive mode . |
String |
toString() |
afterPropertiesSet, getFile, getFile, getFileByName
public void setFtpLocalPassiveMode(boolean ftpLocalPassiveMode)
enter local passive mode
.
This is useful where the server does not have visibility of the client.ftpLocalPassiveMode
- true to enter local passive modeprotected String getMirrorPath()
getMirrorPath
in class AbstractTestFileService
protected List<FileData> listRemoteFiles()
listRemoteFiles
in class AbstractTestFileService
remote name
populatedprotected void downloadRemoteFile(FileData fileData, File localFile) throws IOException
AbstractTestFileService
downloadRemoteFile
in class AbstractTestFileService
fileData
- data containing details of the remote filelocalFile
- the local file to write toIOException
- will be handled by the calling codeCopyright © 2014. All rights reserved.