|
|||||||||||
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(String path)
Changes the working directory. |
boolean |
close()
Closes the connection of the FTP client to the server. |
boolean |
connect(String host,
String username,
String password)
Connects to the specified FTP server using the given credentials to login. |
boolean |
connect(String host,
String username,
String password,
boolean useSSLonCommandChannel,
boolean useSSLonDataChannel)
Connects to the specified FTP server using the given credentials to login. |
Object |
dir()
Returns an object representing the contents of the current working directory on the FTP server. |
boolean |
get(String remoteFile,
String localFile)
Gets a file from the FTP server. |
boolean |
getDebug()
Gets the debug level that has been set. |
Exception |
getLastError()
Returns the last exception occurred. |
boolean |
put(String localFile,
String remoteFile)
Puts a local file on the FTP server. |
boolean |
remove(String path)
Deletes the given file/directory from the FTP server. |
boolean |
rename(String fromPath,
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(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(String host, String username, String password)
host
- the host of the FTP server.username
- the username used to login.password
- the password used to login.
public boolean connect(String host, String username, 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(String remoteFile, 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(String localFile, 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(String path)
path
- the new working directory.
public Object dir()
public boolean remove(String path)
path
- the path of the file/directory to be removed.
public boolean rename(String fromPath, String toPath)
fromPath
- old name.toPath
- new name.
public boolean setLastErr(Exception e)
e
- an exception.
null
, otherwise
false.public 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 |