FTPUpload.java
API description
public FTPUpload(
String getHostName,
int getFTPPort,
String getFtpUser,
String getFtpPwd,
String getFtpFulUploadFilePath,
String getFtpDataString
)
public FTPUpload(
String getHostName,
int getFTPPort,
String getFtpUser,
String getFtpPwd,
String getFtpFulUploadFilePath,
String getFtpFullLocalFilePath,
boolean getUpFrFile
)
- start to upload data to ftp server (將資料上傳至 ftp server)
public int startFTPUpload()
API Example
- Example.1 : upload a data string
FTPUpload fu = new FTPUpload(
"0.0.0.0", 21, "user", "pwd", "/home/example.txt", "example txt"
);
int ftpStatus = fu.startFTPUpload();
- Example.2 : upload a file
FTPUpload fu = new FTPUpload(
"0.0.0.0", 21, "user", "pwd",
"/home/example.txt", "C:\\Users\\user\\Desktop\\example.sql",true
);
int ftpStatus = fu.startFTPUpload();