|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.enterprisedt.net.ftp.FTPClient
com.enterprisedt.net.ftp.pro.ProFTPClient
public class ProFTPClient
Subclass of FTPClient that adds numerous useful methods, mainly for getting and putting of multiple files, including recursively going through directories. Also supports IPV6.
| Field Summary | |
|---|---|
static java.lang.String |
cvsId
Revision control id |
| Fields inherited from class com.enterprisedt.net.ftp.FTPClient |
|---|
CARRIAGE_RETURN, control, controlEncoding, controlPort, data, DEFAULT_BUFFER_SIZE, DEFAULT_ENCODING, DEFAULT_LISTING_LOCALES, DEFAULT_MONITOR_INTERVAL, DEFAULT_TIMEOUT, detectTransferMode, dirEmptyStrings, fileNotFoundStrings, FTP_LINE_SEPARATOR, id, lastReply, lastValidReply, LINE_FEED, messageListener, monitor, monitorEx, monitorInterval, remoteAddr, remoteHost, serverWakeupInterval, timeout, transferBufferSize, transferCompleteStrings, transferType |
| Constructor Summary | |
|---|---|
ProFTPClient()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
connect()
Connects to the server at the address and port number defined in the constructor. |
int |
getCountBeforeSleep()
Get the number of transfers set before sleeping |
int |
getSleepTime()
Get the number of seconds spent asleep |
boolean |
isSleepEnabled()
Is sleeping enabled? |
void |
mdelete(java.io.FileFilter filter)
Deletes all files matching the filter in the current remote directory only |
void |
mdelete(java.lang.String wildcard)
Deletes all files matching the wildcard in the current remote directory only |
void |
mdelete(java.lang.String remoteDir,
java.io.FileFilter filter,
boolean recurse)
Delete all the files in this directory (and its subdirectories if recurse is true) that match the supplied filter. |
void |
mdelete(java.lang.String remoteDir,
java.lang.String wildcard,
boolean recurse)
Delete all the files in this directory (and its subdirectories if recurse is true) that match the supplied wildcard. |
void |
mget(java.lang.String localDir,
java.io.FileFilter filter)
Get all files matching the filter in the current remote directory only into the supplied local directory |
void |
mget(java.lang.String localDir,
java.lang.String wildcard)
Get all files matching the filter in the current remote directory only into the supplied local directory |
void |
mget(java.lang.String localDir,
java.lang.String remoteDir,
java.io.FileFilter filter,
boolean recurse)
Gets this entire remote directory and its contents, recursively going through the remote directory name supplied. |
void |
mget(java.lang.String localDir,
java.lang.String remoteDir,
java.lang.String wildcard,
boolean recurse)
Gets this entire remote directory and its contents, recursively going through the remote directory name supplied. |
void |
mput(java.lang.String localDir,
java.io.FileFilter filter)
Put all files matching the wildcard in the supplied local directory only into the current remote directory |
void |
mput(java.lang.String localDir,
java.lang.String wildcard)
Put all files matching the wildcard in the supplied local directory only into the current remote directory |
void |
mput(java.lang.String localDir,
java.lang.String remoteDir,
java.io.FileFilter filter,
boolean recurse)
Puts this entire directory and its contents. |
void |
mput(java.lang.String localDir,
java.lang.String remoteDir,
java.lang.String wildcard,
boolean recurse)
Puts this entire directory and its contents. |
void |
rmdir(java.lang.String remoteDir,
boolean recurse)
Delete this remote directory. |
void |
setCountBeforeSleep(int countBeforeSleep)
Set the number of transfers required before sleeping |
void |
setSleepEnabled(boolean sleepEnabled)
Set sleeping enabled to be on or off |
void |
setSleepTime(int sleepTime)
Set the time spent asleep |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.enterprisedt.net.ftp.FTPClientInterface |
|---|
cancelResume, cancelTransfer, cdup, chdir, connected, delete, dir, dir, dir, dirDetails, executeCommand, exists, get, get, get, getDeleteCount, getDetectTransferMode, getDownloadCount, getId, getMonitorInterval, getRemoteHost, getRemotePort, getTimeout, getType, getUploadCount, keepAlive, mkdir, modtime, put, put, put, put, put, put, pwd, quit, quitImmediately, rename, resetDeleteCount, resetDownloadCount, resetUploadCount, resume, rmdir, setControlEncoding, setDetectTransferMode, setId, setModTime, setProgressMonitor, setProgressMonitor, setRemoteHost, setRemotePort, setTimeout, setType, size, system |
| Field Detail |
|---|
public static final java.lang.String cvsId
| Constructor Detail |
|---|
public ProFTPClient()
FTPClient.connect()
method is used to perform the actual connection to the remote host.
| Method Detail |
|---|
public void connect()
throws java.io.IOException,
FTPException
connect in interface FTPClientInterfaceconnect in class FTPClientjava.io.IOException - Thrown if there is a TCP/IP-related error.
FTPException - Thrown if there is an error related to the FTP protocol.
public void mdelete(java.lang.String wildcard)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
mdelete in interface ProFTPClientInterfacejava.io.IOException
FTPException
java.text.ParseException
public void mdelete(java.io.FileFilter filter)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
mdelete in interface ProFTPClientInterfacefilter - file filter
java.io.IOException
FTPException
java.text.ParseException
public void mdelete(java.lang.String remoteDir,
java.lang.String wildcard,
boolean recurse)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
mdelete in interface ProFTPClientInterfaceremoteDir - name of remote directorywildcard - filename wildcardrecurse - if true, recurse through subdirectories
java.io.IOException
FTPException
java.text.ParseException
public void mdelete(java.lang.String remoteDir,
java.io.FileFilter filter,
boolean recurse)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
mdelete in interface ProFTPClientInterfaceremoteDir - name of remote directoryfilter - filename filterrecurse - if true, recurse through subdirectories
java.io.IOException
FTPException
java.text.ParseException
public void rmdir(java.lang.String remoteDir,
boolean recurse)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
rmdir in interface ProFTPClientInterfaceremoteDir - name of remote directoryrecurse - if true, recurse through subdirectories
java.io.IOException
FTPException
java.text.ParseException
public void mput(java.lang.String localDir,
java.lang.String wildcard)
throws java.io.IOException,
FTPException
ProFTPClientInterface
mput in interface ProFTPClientInterfacelocalDir - local directory to get files fromwildcard - filename wildcard
java.io.IOException
FTPException
public void mput(java.lang.String localDir,
java.io.FileFilter filter)
throws java.io.IOException,
FTPException
ProFTPClientInterface
mput in interface ProFTPClientInterfacelocalDir - local directory to get files fromfilter - filename filter
java.io.IOException
FTPException
public void mput(java.lang.String localDir,
java.lang.String remoteDir,
java.lang.String wildcard,
boolean recurse)
throws FTPException,
java.io.IOException
ProFTPClientInterface
mput in interface ProFTPClientInterfacelocalDir - name of local directoryremoteDir - name of remote directorywildcard - filename wildcardrecurse - if true recurse into subdirectories
FTPException
java.io.IOException
public void mput(java.lang.String localDir,
java.lang.String remoteDir,
java.io.FileFilter filter,
boolean recurse)
throws FTPException,
java.io.IOException
ProFTPClientInterface
mput in interface ProFTPClientInterfacelocalDir - name of local directoryremoteDir - name of remote directoryfilter - filename filterrecurse - if true recurse into subdirectories
FTPException
java.io.IOException
public void mget(java.lang.String localDir,
java.lang.String wildcard)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
mget in interface ProFTPClientInterfacelocalDir - local directory to get files fromwildcard - filename wildcard
java.io.IOException
FTPException
java.text.ParseException
public void mget(java.lang.String localDir,
java.io.FileFilter filter)
throws java.io.IOException,
FTPException,
java.text.ParseException
ProFTPClientInterface
mget in interface ProFTPClientInterfacelocalDir - local directory to get files fromfilter - filename filter
java.io.IOException
FTPException
java.text.ParseException
public void mget(java.lang.String localDir,
java.lang.String remoteDir,
java.lang.String wildcard,
boolean recurse)
throws FTPException,
java.io.IOException,
java.text.ParseException
ProFTPClientInterface
mget in interface ProFTPClientInterfacelocalDir - name of local directory we are transferring intoremoteDir - name of remote directorywildcard - filename wildcardrecurse - if true recurse into subdirectories
FTPException
java.io.IOException
java.text.ParseException
public void mget(java.lang.String localDir,
java.lang.String remoteDir,
java.io.FileFilter filter,
boolean recurse)
throws FTPException,
java.io.IOException,
java.text.ParseException
ProFTPClientInterface
mget in interface ProFTPClientInterfacelocalDir - name of local directory we are transferring intoremoteDir - name of remote directoryfilter - filename filterrecurse - if true recurse into subdirectories
FTPException
java.io.IOException
java.text.ParseExceptionpublic int getCountBeforeSleep()
ProFTPClientInterface
getCountBeforeSleep in interface ProFTPClientInterfacepublic void setCountBeforeSleep(int countBeforeSleep)
ProFTPClientInterface
setCountBeforeSleep in interface ProFTPClientInterfacecountBeforeSleep - maximum transfer countpublic boolean isSleepEnabled()
ProFTPClientInterface
isSleepEnabled in interface ProFTPClientInterfacepublic void setSleepEnabled(boolean sleepEnabled)
ProFTPClientInterface
setSleepEnabled in interface ProFTPClientInterfacesleepEnabled - if true, sleeping is enabled, otherwise it is switched offpublic int getSleepTime()
ProFTPClientInterface
getSleepTime in interface ProFTPClientInterfacepublic void setSleepTime(int sleepTime)
ProFTPClientInterface
setSleepTime in interface ProFTPClientInterfacesleepTime - sleep time in seconds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||