Java Doc for FTP.java in  » Build » ANT » org » apache » tools » ant » taskdefs » optional » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Build » ANT » org.apache.tools.ant.taskdefs.optional.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.tools.ant.Task
   org.apache.tools.ant.taskdefs.optional.net.FTP

FTP
public class FTP extends Task (Code)
Basic FTP client. Performs the following actions:
  • send - send files to a remote server. This is the default action.
  • get - retrieve files from a remote server.
  • del - delete files from a remote server.
  • list - create a file listing.
  • chmod - change unix file permissions.
  • rmdir - remove directories, if empty, from a remote server.
Note: Some FTP servers - notably the Solaris server - seem to hold data ports open after a "retr" operation, allowing them to timeout instead of shutting them down cleanly. This happens in active or passive mode, and the ports will remain open even after ending the FTP session. FTP "send" operations seem to close ports immediately. This behavior may cause problems on some systems when downloading large sets of files.
since:
   Ant 1.3

Inner Class :protected class FTPDirectoryScanner extends DirectoryScanner
Inner Class :public static class Action extends EnumeratedAttribute
Inner Class :public static class Granularity extends EnumeratedAttribute
Inner Class :public static class FTPSystemType extends EnumeratedAttribute
Inner Class :public static class LanguageCode extends EnumeratedAttribute

Field Summary
final protected static  String[]ACTION_STRS
    
final protected static  String[]ACTION_TARGET_STRS
    
final protected static  intCHMOD
    
final protected static  String[]COMPLETED_ACTION_STRS
    
final public static  intDEFAULT_FTP_PORT
    
final protected static  intDEL_FILES
    
final protected static  intGET_FILES
    
final protected static  intLIST_FILES
    
final protected static  intMK_DIR
    
final protected static  intRM_DIR
    
final protected static  intSEND_FILES
    
final protected static  intSITE_CMD
    


Method Summary
public  voidaddFileset(FileSet set)
    
protected  voidcheckAttributes()
     Checks to see that all required parameters are set.
protected  voidcreateParents(FTPClient ftp, String filename)
     Creates all parent directories specified in a complete relative pathname.
protected  voiddelFile(FTPClient ftp, String filename)
     Delete a file from the remote host.
protected  voiddoSiteCommand(FTPClient ftp, String theCMD)
    
public  voidexecute()
     Runs the task.
protected  voidexecuteRetryable(RetryHandler h, Retryable r, String descr)
     Executable a retryable object.
 StringgetDefaultDateFormatConfig()
    
protected  voidgetFile(FTPClient ftp, String dir, String filename)
     Retrieve a single file from the remote host.
 StringgetRecentDateFormatConfig()
    
 StringgetServerLanguageCodeConfig()
    
 StringgetServerTimeZoneConfig()
    
 StringgetShortMonthNamesConfig()
    
 StringgetSystemTypeKey()
    
 GranularitygetTimestampGranularity()
    
protected  booleanisUpToDate(FTPClient ftp, File localFile, String remoteFile)
     Checks to see if the remote file is current as compared with the local file.
protected  voidlistFile(FTPClient ftp, BufferedWriter bw, String filename)
     List information about a single file from the remote host.
protected  voidmakeRemoteDir(FTPClient ftp, String dir)
     Create the specified directory on the remote host.
Parameters:
  ftp - The FTP client connection
Parameters:
  dir - The directory to create (format must be correct for hosttype)
throws:
  IOException - in unknown circumstances
throws:
  BuildException - if ignoreNoncriticalErrors has not been set to trueand a directory could not be created, for instance because it wasalready existing.
protected  StringresolveFile(String file)
     Correct a file path to correspond to the remote host requirements.
protected  voidrmDir(FTPClient ftp, String dirname)
     Delete a directory, if empty, from the remote host.
protected  voidsendFile(FTPClient ftp, String dir, String filename)
     Sends a single file to the remote host.
public  voidsetAccount(String pAccount)
     Sets the login account to use on the specified server.
public  voidsetAction(String action)
     Sets the FTP action to be taken.
public  voidsetAction(Action action)
     Sets the FTP action to be taken.
public  voidsetBinary(boolean binary)
     If true, uses binary mode, otherwise text mode (default is binary).
public  voidsetChmod(String theMode)
     Sets the file permission mode (Unix only) for files sent to the server.
public  voidsetDefaultDateFormatConfig(String defaultDateFormat)
     Sets the defaultDateFormatConfig attribute.
public  voidsetDepends(boolean depends)
     Set to true to transmit only files that are new or changed from their remote counterparts.
public  voidsetIgnoreNoncriticalErrors(boolean ignoreNoncriticalErrors)
     set the flag to skip errors on directory creation.
public  voidsetInitialSiteCommand(String initialCommand)
     Sets the initialSiteCommand attribute.
public  voidsetListing(File listing)
     The output file for the "list" action.
public  voidsetNewer(boolean newer)
     A synonym for depends.
public  voidsetPassive(boolean passive)
     Specifies whether to use passive mode.
public  voidsetPassword(String password)
     Sets the login password for the given user id.
public  voidsetPort(int port)
     Sets the FTP port used by the remote server.
public  voidsetPreserveLastModified(boolean preserveLastModified)
     Set to true to preserve modification times for "gotten" files.
public  voidsetRecentDateFormatConfig(String recentDateFormat)
     Sets the recentDateFormatConfig attribute.
public  voidsetRemotedir(String dir)
     Sets the remote directory where files will be placed.
public  voidsetRetriesAllowed(String retriesAllowed)
     Defines how many times to retry executing FTP command before giving up. Default is 0 - try once and if failure then give up.
Parameters:
  retriesAllowed - number of retries to allow.
public  voidsetSeparator(String separator)
     Sets the remote file separator character.
public  voidsetServer(String server)
     Sets the FTP server to send files to.
public  voidsetServerLanguageCodeConfig(LanguageCode serverLanguageCode)
     Sets the serverLanguageCode attribute.
public  voidsetServerTimeZoneConfig(String serverTimeZoneId)
     Sets the serverTimeZoneConfig attribute.
public  voidsetShortMonthNamesConfig(String shortMonthNames)
    
public  voidsetSiteCommand(String siteCommand)
     Sets the siteCommand attribute.
public  voidsetSkipFailedTransfers(boolean skipFailedTransfers)
     If true, enables unsuccessful file put, delete and get operations to be skipped with a warning and the remainder of the files still transferred.
public  voidsetSystemTypeKey(FTPSystemType systemKey)
     Sets the systemTypeKey attribute.
public  voidsetTimeDiffAuto(boolean timeDiffAuto)
     "true" to find out automatically the time difference between local and remote machine.
public  voidsetTimeDiffMillis(long timeDiffMillis)
     number of milliseconds to add to the time on the remote machine to get the time on the local machine.
public  voidsetTimestampGranularity(Granularity timestampGranularity)
    
public  voidsetUmask(String theUmask)
     Sets the default mask for file creation on a unix server.
public  voidsetUserid(String userid)
     Sets the login user id to use on the specified server.
public  voidsetVerbose(boolean verbose)
     Set to true to receive notification about each file as it is transferred.
protected  inttransferFiles(FTPClient ftp, FileSet fs)
     For each file in the fileset, do the appropriate action: send, get, delete, or list.
Parameters:
  ftp - the FTPClient instance used to perform FTP actions
Parameters:
  fs - the fileset on which the actions are performed.
protected  voidtransferFiles(FTPClient ftp)
     Sends all files specified by the configured filesets to the remote server.

Field Detail
ACTION_STRS
final protected static String[] ACTION_STRS(Code)



ACTION_TARGET_STRS
final protected static String[] ACTION_TARGET_STRS(Code)



CHMOD
final protected static int CHMOD(Code)



COMPLETED_ACTION_STRS
final protected static String[] COMPLETED_ACTION_STRS(Code)



DEFAULT_FTP_PORT
final public static int DEFAULT_FTP_PORT(Code)
Default port for FTP



DEL_FILES
final protected static int DEL_FILES(Code)



GET_FILES
final protected static int GET_FILES(Code)



LIST_FILES
final protected static int LIST_FILES(Code)



MK_DIR
final protected static int MK_DIR(Code)



RM_DIR
final protected static int RM_DIR(Code)



SEND_FILES
final protected static int SEND_FILES(Code)



SITE_CMD
final protected static int SITE_CMD(Code)





Method Detail
addFileset
public void addFileset(FileSet set)(Code)
A set of files to upload or download
Parameters:
  set - the set of files to be added to the list of files to betransferred.



checkAttributes
protected void checkAttributes() throws BuildException(Code)
Checks to see that all required parameters are set.
throws:
  BuildException - if the configuration is not valid.



createParents
protected void createParents(FTPClient ftp, String filename) throws IOException, BuildException(Code)
Creates all parent directories specified in a complete relative pathname. Attempts to create existing directories will not cause errors.
Parameters:
  ftp - the FTP client instance to use to execute FTP actions onthe remote server.
Parameters:
  filename - the name of the file whose parents should be created.
throws:
  IOException - under non documented circumstances
throws:
  BuildException - if it is impossible to cd to a remote directory



delFile
protected void delFile(FTPClient ftp, String filename) throws IOException, BuildException(Code)
Delete a file from the remote host.
Parameters:
  ftp - ftp client
Parameters:
  filename - file to delete
throws:
  IOException - in unknown circumstances
throws:
  BuildException - if skipFailedTransfers is set to falseand the deletion could not be done



doSiteCommand
protected void doSiteCommand(FTPClient ftp, String theCMD) throws IOException, BuildException(Code)
Sends a site command to the ftp server
Parameters:
  ftp - ftp client
Parameters:
  theCMD - command to execute
throws:
  IOException - in unknown circumstances
throws:
  BuildException - in unknown circumstances



execute
public void execute() throws BuildException(Code)
Runs the task.
throws:
  BuildException - if the task fails or is not configuredcorrectly.



executeRetryable
protected void executeRetryable(RetryHandler h, Retryable r, String descr) throws IOException(Code)
Executable a retryable object.
Parameters:
  h - the retry hander.
Parameters:
  r - the object that should be retried until it succeedsor the number of retrys is reached.
Parameters:
  descr - a description of the command that is being run.
throws:
  IOException - if there is a problem.



getDefaultDateFormatConfig
String getDefaultDateFormatConfig()(Code)
Returns the defaultDateFormatConfig.



getFile
protected void getFile(FTPClient ftp, String dir, String filename) throws IOException, BuildException(Code)
Retrieve a single file from the remote host. filename may contain a relative path specification.

The file will then be retreived using the entire relative path spec - no attempt is made to change directories. It is anticipated that this may eventually cause problems with some FTP servers, but it simplifies the coding.


Parameters:
  ftp - the ftp client
Parameters:
  dir - local base directory to which the file should go back
Parameters:
  filename - relative path of the file based upon the ftp remote directoryand/or the local base directory (dir)
throws:
  IOException - in unknown circumstances
throws:
  BuildException - if skipFailedTransfers is falseand the file cannot be retrieved.



getRecentDateFormatConfig
String getRecentDateFormatConfig()(Code)
Returns the recentDateFormatConfig.



getServerLanguageCodeConfig
String getServerLanguageCodeConfig()(Code)
Returns the serverLanguageCodeConfig.



getServerTimeZoneConfig
String getServerTimeZoneConfig()(Code)
Returns the serverTimeZoneConfig.



getShortMonthNamesConfig
String getShortMonthNamesConfig()(Code)
Returns the shortMonthNamesConfig.



getSystemTypeKey
String getSystemTypeKey()(Code)
Returns the systemTypeKey.



getTimestampGranularity
Granularity getTimestampGranularity()(Code)
Returns the timestampGranularity.



isUpToDate
protected boolean isUpToDate(FTPClient ftp, File localFile, String remoteFile) throws IOException, BuildException(Code)
Checks to see if the remote file is current as compared with the local file. Returns true if the target file is up to date.
Parameters:
  ftp - ftpclient
Parameters:
  localFile - local file
Parameters:
  remoteFile - remote file true if the target file is up to date
throws:
  IOException - in unknown circumstances
throws:
  BuildException - if the date of the remote files cannot be found and the action isGET_FILES



listFile
protected void listFile(FTPClient ftp, BufferedWriter bw, String filename) throws IOException, BuildException(Code)
List information about a single file from the remote host. filename may contain a relative path specification.

The file listing will then be retrieved using the entire relative path spec - no attempt is made to change directories. It is anticipated that this may eventually cause problems with some FTP servers, but it simplifies the coding.


Parameters:
  ftp - ftp client
Parameters:
  bw - buffered writer
Parameters:
  filename - the directory one wants to list
throws:
  IOException - in unknown circumstances
throws:
  BuildException - in unknown circumstances



makeRemoteDir
protected void makeRemoteDir(FTPClient ftp, String dir) throws IOException, BuildException(Code)
Create the specified directory on the remote host.
Parameters:
  ftp - The FTP client connection
Parameters:
  dir - The directory to create (format must be correct for hosttype)
throws:
  IOException - in unknown circumstances
throws:
  BuildException - if ignoreNoncriticalErrors has not been set to trueand a directory could not be created, for instance because it wasalready existing. Precisely, the codes 521, 550 and 553 will triggera BuildException



resolveFile
protected String resolveFile(String file)(Code)
Correct a file path to correspond to the remote host requirements. This implementation currently assumes that the remote end can handle Unix-style paths with forward-slash separators. This can be overridden with the separator task parameter. No attempt is made to determine what syntax is appropriate for the remote host.
Parameters:
  file - the remote file name to be resolved the filename as it will appear on the server.



rmDir
protected void rmDir(FTPClient ftp, String dirname) throws IOException, BuildException(Code)
Delete a directory, if empty, from the remote host.
Parameters:
  ftp - ftp client
Parameters:
  dirname - directory to delete
throws:
  IOException - in unknown circumstances
throws:
  BuildException - if skipFailedTransfers is set to falseand the deletion could not be done



sendFile
protected void sendFile(FTPClient ftp, String dir, String filename) throws IOException, BuildException(Code)
Sends a single file to the remote host. filename may contain a relative path specification. When this is the case, sendFile will attempt to create any necessary parent directories before sending the file. The file will then be sent using the entire relative path spec - no attempt is made to change directories. It is anticipated that this may eventually cause problems with some FTP servers, but it simplifies the coding.
Parameters:
  ftp - ftp client
Parameters:
  dir - base directory of the file to be sent (local)
Parameters:
  filename - relative path of the file to be sendlocally relative to dirremotely relative to the remotedir attribute
throws:
  IOException - in unknown circumstances
throws:
  BuildException - in unknown circumstances



setAccount
public void setAccount(String pAccount)(Code)
Sets the login account to use on the specified server.
Parameters:
  pAccount - the account name on remote system
since:
   Ant 1.7



setAction
public void setAction(String action) throws BuildException(Code)
Sets the FTP action to be taken. Currently accepts "put", "get", "del", "mkdir", "chmod", "list", and "site".
Parameters:
  action - the FTP action to be performed.
throws:
  BuildException - if the action is not a valid action.



setAction
public void setAction(Action action) throws BuildException(Code)
Sets the FTP action to be taken. Currently accepts "put", "get", "del", "mkdir", "chmod", "list", and "site".
Parameters:
  action - the FTP action to be performed.
throws:
  BuildException - if the action is not a valid action.



setBinary
public void setBinary(boolean binary)(Code)
If true, uses binary mode, otherwise text mode (default is binary).
Parameters:
  binary - if true use binary mode in transfers.



setChmod
public void setChmod(String theMode)(Code)
Sets the file permission mode (Unix only) for files sent to the server.
Parameters:
  theMode - unix style file mode for the files sent to the remotesystem.



setDefaultDateFormatConfig
public void setDefaultDateFormatConfig(String defaultDateFormat)(Code)
Sets the defaultDateFormatConfig attribute.
Parameters:
  defaultDateFormat - configuration to be set, unless it isnull or empty string, in which case ignored.
See Also:   org.apache.commons.net.ftp.FTPClientConfig



setDepends
public void setDepends(boolean depends)(Code)
Set to true to transmit only files that are new or changed from their remote counterparts. The default is to transmit all files.
Parameters:
  depends - if true only transfer newer files.



setIgnoreNoncriticalErrors
public void setIgnoreNoncriticalErrors(boolean ignoreNoncriticalErrors)(Code)
set the flag to skip errors on directory creation. (and maybe later other server specific errors)
Parameters:
  ignoreNoncriticalErrors - true if non-critical errors should notcause a failure.



setInitialSiteCommand
public void setInitialSiteCommand(String initialCommand)(Code)
Sets the initialSiteCommand attribute. This attribute names a site command that will be executed immediately after connection.
Parameters:
  initialCommand - The initialSiteCommand to set.



setListing
public void setListing(File listing)(Code)
The output file for the "list" action. This attribute is ignored for any other actions.
Parameters:
  listing - file in which to store the listing.



setNewer
public void setNewer(boolean newer)(Code)
A synonym for depends. Set to true to transmit only new or changed files. See the related attributes timediffmillis and timediffauto.
Parameters:
  newer - if true only transfer newer files.



setPassive
public void setPassive(boolean passive)(Code)
Specifies whether to use passive mode. Set to true if you are behind a firewall and cannot connect without it. Passive mode is disabled by default.
Parameters:
  passive - true is passive mode should be used.



setPassword
public void setPassword(String password)(Code)
Sets the login password for the given user id.
Parameters:
  password - the password on the remote system.



setPort
public void setPort(int port)(Code)
Sets the FTP port used by the remote server.
Parameters:
  port - the port on which the remote server is listening.



setPreserveLastModified
public void setPreserveLastModified(boolean preserveLastModified)(Code)
Set to true to preserve modification times for "gotten" files.
Parameters:
  preserveLastModified - if true preserver modification times.



setRecentDateFormatConfig
public void setRecentDateFormatConfig(String recentDateFormat)(Code)
Sets the recentDateFormatConfig attribute.
Parameters:
  recentDateFormat - configuration to be set, unless it isnull or empty string, in which case ignored.
See Also:   org.apache.commons.net.ftp.FTPClientConfig



setRemotedir
public void setRemotedir(String dir)(Code)
Sets the remote directory where files will be placed. This may be a relative or absolute path, and must be in the path syntax expected by the remote server. No correction of path syntax will be performed.
Parameters:
  dir - the remote directory name.



setRetriesAllowed
public void setRetriesAllowed(String retriesAllowed)(Code)
Defines how many times to retry executing FTP command before giving up. Default is 0 - try once and if failure then give up.
Parameters:
  retriesAllowed - number of retries to allow. -1 meanskeep trying forever. "forever" may also be specified as asynonym for -1.



setSeparator
public void setSeparator(String separator)(Code)
Sets the remote file separator character. This normally defaults to the Unix standard forward slash, but can be manually overridden using this call if the remote server requires some other separator. Only the first character of the string is used.
Parameters:
  separator - the file separator on the remote system.



setServer
public void setServer(String server)(Code)
Sets the FTP server to send files to.
Parameters:
  server - the remote server name.



setServerLanguageCodeConfig
public void setServerLanguageCodeConfig(LanguageCode serverLanguageCode)(Code)
Sets the serverLanguageCode attribute.
Parameters:
  serverLanguageCode - configuration to be set, unless it isnull or empty string, in which case ignored.
See Also:   org.apache.commons.net.ftp.FTPClientConfig



setServerTimeZoneConfig
public void setServerTimeZoneConfig(String serverTimeZoneId)(Code)
Sets the serverTimeZoneConfig attribute.
Parameters:
  serverTimeZoneId - configuration to be set, unless it isnull or empty string, in which case ignored.
See Also:   org.apache.commons.net.ftp.FTPClientConfig



setShortMonthNamesConfig
public void setShortMonthNamesConfig(String shortMonthNames)(Code)
Sets the shortMonthNamesConfig attribute
Parameters:
  shortMonthNames - configuration to be set, unless it isnull or empty string, in which case ignored.
See Also:   org.apache.commons.net.ftp.FTPClientConfig



setSiteCommand
public void setSiteCommand(String siteCommand)(Code)
Sets the siteCommand attribute. This attribute names the command that will be executed if the action is "site".
Parameters:
  siteCommand - The siteCommand to set.



setSkipFailedTransfers
public void setSkipFailedTransfers(boolean skipFailedTransfers)(Code)
If true, enables unsuccessful file put, delete and get operations to be skipped with a warning and the remainder of the files still transferred.
Parameters:
  skipFailedTransfers - true if failures in transfers are ignored.



setSystemTypeKey
public void setSystemTypeKey(FTPSystemType systemKey)(Code)
Sets the systemTypeKey attribute. Method for setting FTPClientConfig remote system key.
Parameters:
  systemKey - the key to be set - BUT if blankthe default value of null (which signifies "autodetect") will be kept.
See Also:   org.apache.commons.net.ftp.FTPClientConfig



setTimeDiffAuto
public void setTimeDiffAuto(boolean timeDiffAuto)(Code)
"true" to find out automatically the time difference between local and remote machine. This requires right to create and delete a temporary file in the remote directory.
Parameters:
  timeDiffAuto - true = find automatically the time diff
since:
   ant 1.6



setTimeDiffMillis
public void setTimeDiffMillis(long timeDiffMillis)(Code)
number of milliseconds to add to the time on the remote machine to get the time on the local machine. use in conjunction with newer
Parameters:
  timeDiffMillis - number of milliseconds
since:
   ant 1.6



setTimestampGranularity
public void setTimestampGranularity(Granularity timestampGranularity)(Code)
Sets the timestampGranularity attribute
Parameters:
  timestampGranularity - The timestampGranularity to set.



setUmask
public void setUmask(String theUmask)(Code)
Sets the default mask for file creation on a unix server.
Parameters:
  theUmask - unix style umask for files created on the remote server.



setUserid
public void setUserid(String userid)(Code)
Sets the login user id to use on the specified server.
Parameters:
  userid - remote system userid.



setVerbose
public void setVerbose(boolean verbose)(Code)
Set to true to receive notification about each file as it is transferred.
Parameters:
  verbose - true if verbose notifications are required.



transferFiles
protected int transferFiles(FTPClient ftp, FileSet fs) throws IOException, BuildException(Code)
For each file in the fileset, do the appropriate action: send, get, delete, or list.
Parameters:
  ftp - the FTPClient instance used to perform FTP actions
Parameters:
  fs - the fileset on which the actions are performed. the number of files to be transferred.
throws:
  IOException - if there is a problem reading a file
throws:
  BuildException - if there is a problem in the configuration.



transferFiles
protected void transferFiles(FTPClient ftp) throws IOException, BuildException(Code)
Sends all files specified by the configured filesets to the remote server.
Parameters:
  ftp - the FTPClient instance used to perform FTP actions
throws:
  IOException - if there is a problem reading a file
throws:
  BuildException - if there is a problem in the configuration.



Fields inherited from org.apache.tools.ant.Task
protected Target target(Code)(Java Doc)
protected String taskName(Code)(Java Doc)
protected String taskType(Code)(Java Doc)
protected RuntimeConfigurable wrapper(Code)(Java Doc)

Methods inherited from org.apache.tools.ant.Task
final public void bindToOwner(Task owner)(Code)(Java Doc)
public void execute() throws BuildException(Code)(Java Doc)
public Target getOwningTarget()(Code)(Java Doc)
public RuntimeConfigurable getRuntimeConfigurableWrapper()(Code)(Java Doc)
public String getTaskName()(Code)(Java Doc)
public String getTaskType()(Code)(Java Doc)
protected RuntimeConfigurable getWrapper()(Code)(Java Doc)
protected void handleErrorFlush(String output)(Code)(Java Doc)
protected void handleErrorOutput(String output)(Code)(Java Doc)
protected void handleFlush(String output)(Code)(Java Doc)
protected int handleInput(byte[] buffer, int offset, int length) throws IOException(Code)(Java Doc)
protected void handleOutput(String output)(Code)(Java Doc)
public void init() throws BuildException(Code)(Java Doc)
final protected boolean isInvalid()(Code)(Java Doc)
public void log(String msg)(Code)(Java Doc)
public void log(String msg, int msgLevel)(Code)(Java Doc)
public void log(Throwable t, int msgLevel)(Code)(Java Doc)
public void log(String msg, Throwable t, int msgLevel)(Code)(Java Doc)
public void maybeConfigure() throws BuildException(Code)(Java Doc)
final public void perform()(Code)(Java Doc)
public void reconfigure()(Code)(Java Doc)
public void setOwningTarget(Target target)(Code)(Java Doc)
public void setRuntimeConfigurableWrapper(RuntimeConfigurable wrapper)(Code)(Java Doc)
public void setTaskName(String name)(Code)(Java Doc)
public void setTaskType(String type)(Code)(Java Doc)

w__w__w_._j__a_v___a__2___s__.c__om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.