instance()
method.GXFtpRequest
,
  GXFtpRequest uploadReq = new GXFtpRequest();
  uploadReq.setUser(user);
  uploadReq.setPassword(pass);
  uploadReq.setServer(host ip address);
  uploadReq.setRemoteFile(remote file using full path);
  uploadReq.setValue(GXMFCommands.CMD_MF_DATA_TYPE, GXMFCommands.CMD_VAL_MF_DATA_TYPE_BIN)
  try {
  uploadReq.readFileToUpload(local file using full path);
  GXFtpManager.instance().putFile(uploadReq);
  } catch (GXGeneralException e) {
  e.printStackTrace();
  }
 
  GXFtpRequest downloadReq = new GXFtpRequest();
  downloadReq.setUser(user);
  downloadReq.setPassword(pass);
  downloadReq.setServer(host ip address);
  downloadReq.setRemoteFile(remote file using full path);
  downloadReq.setValue(GXMFCommands.CMD_MF_DATA_TYPE, GXMFCommands.CMD_VAL_MF_DATA_TYPE_BIN);
  try {
  GXFtpResponse resp = GXFtpManager.instance().getFile(downloadReq);
  resp.writeFileToDisk(local file using full path);
  } catch (GXFtpException e) {
  e.getMessage();
  }
See: Description
Class | Description |
---|---|
GXFtpConsts | |
GXFtpException |
Exception thrown when unexpected or negative reply is received from
the server.
|
GXFtpManager |
This class supplies a batch API for the ApplinX FTP mechanism.
|
GXFtpRequest |
This class is used as a data structure for all the parameters which are relevant
for an FTP transmission. |
GXFtpResponse |
This class holds the data retrieved from an FTP download request.
|
GXFtpTypes |
instance()
method.GXFtpRequest
,
  GXFtpRequest uploadReq = new GXFtpRequest();
  uploadReq.setUser(user);
  uploadReq.setPassword(pass);
  uploadReq.setServer(host ip address);
  uploadReq.setRemoteFile(remote file using full path);
  uploadReq.setValue(GXMFCommands.CMD_MF_DATA_TYPE, GXMFCommands.CMD_VAL_MF_DATA_TYPE_BIN)
  try {
  uploadReq.readFileToUpload(local file using full path);
  GXFtpManager.instance().putFile(uploadReq);
  } catch (GXGeneralException e) {
  e.printStackTrace();
  }
 
  GXFtpRequest downloadReq = new GXFtpRequest();
  downloadReq.setUser(user);
  downloadReq.setPassword(pass);
  downloadReq.setServer(host ip address);
  downloadReq.setRemoteFile(remote file using full path);
  downloadReq.setValue(GXMFCommands.CMD_MF_DATA_TYPE, GXMFCommands.CMD_VAL_MF_DATA_TYPE_BIN);
  try {
  GXFtpResponse resp = GXFtpManager.instance().getFile(downloadReq);
  resp.writeFileToDisk(local file using full path);
  } catch (GXFtpException e) {
  e.getMessage();
  }
Copyright 2021 Software AG. All rights reserved. Use is subject to license terms.