|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.protocols.FTPBean
public class FTPBean
This class helps to expose the functionality of the FTP Client through the scripting environment.
| Nested Class Summary | |
|---|---|
static class |
FTPBean.DirectoryContents
This class is a container in which the contents of a directory can be saved. |
| Constructor Summary | |
|---|---|
FTPBean()
Constructor creating the FTP client object. |
|
| Method Summary | |
|---|---|
boolean |
cd(java.lang.String path)
Changes the working directory. |
boolean |
close()
Closes the connection of the FTP client to the server. |
boolean |
connect(java.lang.String host,
java.lang.String username,
java.lang.String password)
Connects to the specified FTP server using the given credentials to login. |
boolean |
connect(java.lang.String host,
java.lang.String username,
java.lang.String password,
boolean useSSLonCommandChannel,
boolean useSSLonDataChannel)
Connects to the specified FTP server using the given credentials to login. |
java.lang.Object |
dir()
Returns an object representing the contents of the current working directory on the FTP server. |
boolean |
get(java.lang.String remoteFile,
java.lang.String localFile)
Gets a file from the FTP server. |
boolean |
getDebug()
Gets the debug level that has been set. |
java.lang.Exception |
getLastError()
Returns the last exception occurred. |
boolean |
put(java.lang.String localFile,
java.lang.String remoteFile)
Puts a local file on the FTP server. |
boolean |
remove(java.lang.String path)
Deletes the given file/directory from the FTP server. |
boolean |
rename(java.lang.String fromPath,
java.lang.String toPath)
Renames the given file/directory on the FTP server. |
void |
setAscii()
Sets ASCII transfer mode. |
void |
setBinary()
Sets binary transfer mode. |
void |
setDebug(boolean debug)
Sets the debug level of the FTP client. |
boolean |
setLastErr(java.lang.Exception e)
Sets the passed as parameter exception as the last exception of the FTP client so far. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FTPBean()
| Method Detail |
|---|
public boolean connect(java.lang.String host,
java.lang.String username,
java.lang.String password)
host - the host of the FTP server.username - the username used to login.password - the password used to login.
public boolean connect(java.lang.String host,
java.lang.String username,
java.lang.String password,
boolean useSSLonCommandChannel,
boolean useSSLonDataChannel)
host - the host of the FTP server.username - the username used to login.password - the password used to login.useSSLonCommandChannel - whether to use SSL on the control channel.useSSLonDataChannel - whether to use SSL on the data channel.
public boolean close()
public void setBinary()
public void setAscii()
public boolean get(java.lang.String remoteFile,
java.lang.String localFile)
remoteFile - the file to be retrieved from the server.localFile - the name used to save the file on the local machine.
public boolean put(java.lang.String localFile,
java.lang.String remoteFile)
localFile - the local file to be sent to the server.remoteFile - the name used for saving the file on the server.
public boolean cd(java.lang.String path)
path - the new working directory.
public java.lang.Object dir()
public boolean remove(java.lang.String path)
path - the path of the file/directory to be removed.
public boolean rename(java.lang.String fromPath,
java.lang.String toPath)
fromPath - old name.toPath - new name.
public boolean setLastErr(java.lang.Exception e)
e - an exception.
null, otherwise
false.public java.lang.Exception getLastError()
public void setDebug(boolean debug)
debug - if true detailed logging will be used, otherwise no.public boolean getDebug()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||