GridFTPClient destClient = null;
GridFTPClient srcClient = null;
try {
destClient = new GridFTPClient(desthost.getHost(), desthost.getPort());
destClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
destClient.authenticate(gssCred);
if (checkBinaryExtensions(desthost.getPath())) {
log.debug("Transfer mode is set to Binary");
destClient.setType(Session.TYPE_IMAGE);
}
srcClient = new GridFTPClient(srchost.getHost(), srchost.getPort());
srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
srcClient.authenticate(gssCred);
if (checkBinaryExtensions(srchost.getPath())) {
log.debug("Transfer mode is set to Binary");
srcClient.setType(Session.TYPE_IMAGE);