EPR epr = ListenerUtil.assembleEpr(config);
if (epr instanceof FTPEpr) {
FTPEpr ftpEpr = (FTPEpr) epr;
rfs = RemoteFileSystemFactory.getRemoteFileSystem(ftpEpr, true);
rfs.setRemoteDir(FtpClientUtil.fileToFtpString(_inputDirectory));
rfs.downloadFile(file.toString(), temp.getAbsolutePath());
final byte[] contents = super.getFileContents(temp);
temp.delete() ;
return contents ;
} else {
throw new GatewayException("This Gateway only accepts FTP and SFTP.");