|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.soa.esb.util.FtpClientUtil
public class FtpClientUtil
Simplified FTP transfers
Description: Implements a simple set of FTP functionality Parameters to
establish the FTP connection are provided at construction time and cannot
change during the lifetime of the object
Hides low level details.
| Nested Class Summary | |
|---|---|
static class |
FtpClientUtil.XFER_TYPE
|
| Constructor Summary | |
|---|---|
FtpClientUtil(ConfigTree p_oP,
boolean p_bConnect)
Checks validity and completeness of parameters, and keeps the info internally for subsequent FTP requests |
|
FtpClientUtil(java.util.List<KeyValuePair> attribs,
boolean connect)
|
|
| Method Summary | |
|---|---|
void |
deleteRemoteFile(java.lang.String p_sFile)
Deletes specified file in remote directory |
void |
downloadFile(java.lang.String p_sFile,
java.lang.String p_sFinalName)
Downloads specified file from remote directory (remoteDirURI) to local directory (localDirURI) |
static java.lang.String |
fileToFtpString(java.io.File p_oF)
|
java.lang.String[] |
getFileListFromRemoteDir(java.lang.String p_sSuffix)
Gets the list of files in the remote directory that end with arg0 |
java.lang.String |
getRemoteDir()
|
void |
quit()
Terminates ftp session and frees resources Well behaved programs should make sure to call this method |
void |
remoteDelete(java.io.File p_oFile)
|
void |
remoteRename(java.io.File p_oFrom,
java.io.File p_oTo)
|
void |
renameInRemoteDir(java.lang.String p_sFrom,
java.lang.String p_sTo)
Renames specified file in remote directory to specified new name |
void |
setRemoteDir(java.lang.String p_sDir)
Change remote directory |
void |
uploadFile(java.io.File p_oFile,
java.lang.String p_sRemoteName)
Uploads specified file from local directory (localDirURI) to remote directory (remoteDirURI) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FtpClientUtil(ConfigTree p_oP,
boolean p_bConnect)
throws RemoteFileSystemException,
ConfigurationException
p_oP - ConfigTree
ConfigurationException - :
if parameters are invalid or incomplete
RemoteFileSystemException
public FtpClientUtil(java.util.List<KeyValuePair> attribs,
boolean connect)
throws RemoteFileSystemException,
ConfigurationException
RemoteFileSystemException
ConfigurationException| Method Detail |
|---|
public java.lang.String getRemoteDir()
public void quit()
public void deleteRemoteFile(java.lang.String p_sFile)
throws RemoteFileSystemException
p_sFile - String : filename to delete. Method will attempt to delete
file with rightmost node of argument within remote directory
specified in 'remoteDirURI'
RemoteFileSystemException - :
if ftp connection cannot be established, or file cannot be
deleted in remote directory
public void remoteDelete(java.io.File p_oFile)
throws RemoteFileSystemException
RemoteFileSystemException
public java.lang.String[] getFileListFromRemoteDir(java.lang.String p_sSuffix)
throws RemoteFileSystemException
p_sSuffix - String : retrieve only files that end with that suffix - all
files if null
RemoteFileSystemException - :
if ftp connection cannot be established, or problems
encountered
public void setRemoteDir(java.lang.String p_sDir)
throws RemoteFileSystemException
p_sDir - String : directory to set
RemoteFileSystemException - :
if ftp connection cannot be established, or problems
encountered
public void renameInRemoteDir(java.lang.String p_sFrom,
java.lang.String p_sTo)
throws RemoteFileSystemException
p_sFrom - String : filename to renamep_sTo - String : new filename
RemoteFileSystemException - :
if ftp connection cannot be established, or file cannot be
renamed to new name in remote directory
public void remoteRename(java.io.File p_oFrom,
java.io.File p_oTo)
throws RemoteFileSystemException
RemoteFileSystemException
public void uploadFile(java.io.File p_oFile,
java.lang.String p_sRemoteName)
throws RemoteFileSystemException
p_oFile - String : filename to upload
RemoteFileSystemException - :
if ftp connection cannot be established, or file cannot be
uploaded
public void downloadFile(java.lang.String p_sFile,
java.lang.String p_sFinalName)
throws RemoteFileSystemException
p_sFile - String : filename to download
RemoteFileSystemException - :
if ftp connection cannot be established, or file cannot be
downloaded
public static java.lang.String fileToFtpString(java.io.File p_oF)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||