ElegantJCharts Java API Specification v2.0

com.elegantj.net.ftp
Class FTPClient

java.lang.Object
  |
  +--com.elegantj.net.ftp.FTPClient
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class FTPClient
extends java.lang.Object
implements java.io.Externalizable

This class encapsulates functionality of an FTP client.

See Also:
Serialized Form

Field Summary
 C1 c1
           
 
Constructor Summary
FTPClient()
          Constructs an FTP client with default FTP port.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 void addStatusListener(StatusListener l)
           
 void changeToParentDirectory()
          Method for changing to remote parent directory.
 void changeWorkingDirectory(java.lang.String remotePath)
          Method for changing a working remote directory.
 boolean connect()
          Method for connect to FTP server.
 void deleteRemoteFile(java.lang.String remotePath)
          Method for delete a remote file.
 void disconnect()
          Method for disconnect from FTP server.
 void downloadRemoteFile(java.lang.String remotePath, java.lang.String localPath)
          Method for download a remote file from FTP server.
 java.lang.String getCurrentWorkingDirectory()
          Method which returns name of current working remote directory.
 java.lang.String getFileList()
          Method which returns a list of files in current working remote directory.
 java.lang.String getHostName()
          Method which returns the FTP Server host name.
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 java.lang.String getPassword()
          Method which returns the password.
 int getPort()
          Method which returns the FTP port.
 java.lang.String getUserName()
          Method which returns the username.
 void makeRemoteDirectory(java.lang.String remotePath)
          Method for making a new remote directory.
 void readExternal(java.io.ObjectInput ois)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 void removeRemoteDirectory(java.lang.String remotePath)
          Method for removing a remote directory.
 void removeStatusListener(StatusListener l)
           
 void renameRemoteFile(java.lang.String oldPath, java.lang.String newPath)
          Method for rename a remote file.
 void setHostName(java.lang.String newHost)
          Method which set the FTP Server host name.
 void setLicenseKey(java.lang.String licenseKey)
          Methods which sets the license key
 void setPassword(java.lang.String newPass)
          Method which set the password to logging into FTP Server.
 void setPort(int newPort)
          Method which set the FTP port.
 void setUserName(java.lang.String newUser)
          Method which set the username to logging into FTP Server.
 void uploadLocalFile(java.lang.String remoteFileName, java.lang.String localPath)
          Method for upload a local file to FTP server.
 void writeExternal(java.io.ObjectOutput oos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c1

public C1 c1
Constructor Detail

FTPClient

public FTPClient()
Constructs an FTP client with default FTP port.

Method Detail

addStatusListener

public void addStatusListener(StatusListener l)

removeStatusListener

public void removeStatusListener(StatusListener l)

connect

public boolean connect()
Method for connect to FTP server.

Returns:
true if successfully connected to FTP Server, false otherwise.

disconnect

public void disconnect()
Method for disconnect from FTP server.


uploadLocalFile

public void uploadLocalFile(java.lang.String remoteFileName,
                            java.lang.String localPath)
Method for upload a local file to FTP server.

Parameters:
remoteFileName - Remote file name.
localPath - The path of local file.

downloadRemoteFile

public void downloadRemoteFile(java.lang.String remotePath,
                               java.lang.String localPath)
Method for download a remote file from FTP server.

Parameters:
remotePath - The remote path.
localPath - The local path.

changeWorkingDirectory

public void changeWorkingDirectory(java.lang.String remotePath)
Method for changing a working remote directory.


changeToParentDirectory

public void changeToParentDirectory()
Method for changing to remote parent directory.


deleteRemoteFile

public void deleteRemoteFile(java.lang.String remotePath)
Method for delete a remote file.

Parameters:
remotePath - The path of the remote file.

renameRemoteFile

public void renameRemoteFile(java.lang.String oldPath,
                             java.lang.String newPath)
Method for rename a remote file.

Parameters:
oldPath - The name of a remote file.
newPath - The new name of a remote file.

removeRemoteDirectory

public void removeRemoteDirectory(java.lang.String remotePath)
Method for removing a remote directory.

Parameters:
remotePath - The path of remote directory.

makeRemoteDirectory

public void makeRemoteDirectory(java.lang.String remotePath)
Method for making a new remote directory.

Parameters:
remotePath - The path of new remote directory.

getFileList

public java.lang.String getFileList()
Method which returns a list of files in current working remote directory.

Returns:
The file listing in current working directory.

getCurrentWorkingDirectory

public java.lang.String getCurrentWorkingDirectory()
Method which returns name of current working remote directory.

Returns:
The name of current working remote directory.

setHostName

public void setHostName(java.lang.String newHost)
Method which set the FTP Server host name.

Parameters:
newHost - The FTP Server host name.

getHostName

public java.lang.String getHostName()
Method which returns the FTP Server host name.

Returns:
The FTP Server host name.

setPort

public void setPort(int newPort)
Method which set the FTP port.

Parameters:
newPort - The FTP port.

getPort

public int getPort()
Method which returns the FTP port.

Returns:
The FTP port.

setUserName

public void setUserName(java.lang.String newUser)
Method which set the username to logging into FTP Server.

Parameters:
newUser - The username to logging into FTP Server.

getUserName

public java.lang.String getUserName()
Method which returns the username.

Returns:
The username.

setPassword

public void setPassword(java.lang.String newPass)
Method which set the password to logging into FTP Server.

Parameters:
newPass - The password to logging into FTP Server.

getPassword

public java.lang.String getPassword()
Method which returns the password.

Returns:
The password.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
Methods which sets the license key


getLicenseKey

public java.lang.String getLicenseKey()
Returns the license key of the bean

Returns:
The license key of the bean

writeExternal

public void writeExternal(java.io.ObjectOutput oos)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput ois)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.