public class Messenger extends ArcIF
| Constructor and Description |
|---|
Messenger(java.lang.String dirname)
Class constructor specifying the local directory.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Send()
Sends the contents of the specified directory, by performing the following actions in a sequential manner:
1) connects to FTP server
2) logs in to FTP server
3) uploads the files one by one (also checks for the successful transfer)
4) logs out
5) disconnects
Returns a boolean value which notifies whether the upload has been completed successfully.
|
void |
SetCredentials(java.lang.String username,
java.lang.String password)
Sets the credentials required for logging in to the remote FTP server.
|
void |
SetRemoteAddress(java.lang.String ipAddress,
int port)
Sets the IP address and the port to the remote FTP server.
|
public Messenger(java.lang.String dirname)
dirname - The name of the local directory.public void SetRemoteAddress(java.lang.String ipAddress,
int port)
ipAddress - The IP address of the FTP server.port - The port of the FTP server.public void SetCredentials(java.lang.String username,
java.lang.String password)
username - The username for logging in.password - The password for logging in.public boolean Send()