You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by br...@apache.org on 2003/12/29 20:42:44 UTC

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTP.java FTPClient.java FTPCommand.java FTPFile.java

brekke      2003/12/29 11:42:44

  Modified:    net/src/java/org/apache/commons/net/ftp FTP.java
                        FTPClient.java FTPCommand.java FTPFile.java
  Log:
  Javadocs updated in the org.apache.commons.net.ftp package.  Just went
  through the warnings.  There are many more in other packages to clear up.
  
  Revision  Changes    Path
  1.6       +13 -16    jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTP.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FTP.java	26 Aug 2003 05:43:55 -0000	1.5
  +++ FTP.java	29 Dec 2003 19:42:44 -0000	1.6
  @@ -628,11 +628,10 @@
           return sendCommand(FTPCommand.USER, username);
       }
   
  -    /***
  +    /**
        * A convenience method to send the FTP PASS command to the server,
        * receive the reply, and return the reply code.
  -     * <p>
  -     * @param pass  The plain text password of the username being logged into.
  +     * @param password The plain text password of the username being logged into.
        * @return The reply code received from the server.
        * @exception FTPConnectionClosedException
        *      If the FTP server prematurely closes the connection as a result
  @@ -641,7 +640,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending the
        *      command or receiving the server reply.
  -     ***/
  +     */
       public int pass(String password) throws IOException
       {
           return sendCommand(FTPCommand.PASS, password);
  @@ -828,11 +827,10 @@
           return sendCommand(FTPCommand.PASV);
       }
   
  -    /***
  +    /**
        * A convenience method to send the FTP TYPE command for text files
        * to the server, receive the reply, and return the reply code.
  -     * <p>
  -     * @param type  The type of the file (one of the <code>FILE_TYPE</code>
  +     * @param fileType  The type of the file (one of the <code>FILE_TYPE</code>
        *              constants).
        * @param formatOrByteSize  The format of the file (one of the
        *              <code>_FORMAT</code> constants.  In the case of
  @@ -845,7 +843,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending the
        *      command or receiving the server reply.
  -     ***/
  +     */
       public int type(int fileType, int formatOrByteSize) throws IOException
       {
           StringBuffer arg = new StringBuffer();
  @@ -861,11 +859,11 @@
       }
   
   
  -    /***
  +    /**
        * A convenience method to send the FTP TYPE command to the server,
        * receive the reply, and return the reply code.
        * <p>
  -     * @param type  The type of the file (one of the <code>FILE_TYPE</code>
  +     * @param fileType  The type of the file (one of the <code>FILE_TYPE</code>
        *              constants).
        * @return The reply code received from the server.
        * @exception FTPConnectionClosedException
  @@ -875,7 +873,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending the
        *      command or receiving the server reply.
  -     ***/
  +     */
       public int type(int fileType) throws IOException
       {
           return sendCommand(FTPCommand.TYPE,
  @@ -995,8 +993,7 @@
        * receive the reply, and return the reply code.  Remember, it is up
        * to you to manage the data connection.  If you don't need this low
        * level of access, use <a href="org.apache.commons.net.ftp.FTPClient.html">
  -     * FTPClient</a>, which will handle all low level details for you.
  -     * <p>
  +     * FTPClient</a>, which will handle all low level details for you. 
        * @param pathname  The base pathname to use for the file when stored at
        *                  the remote end of the transfer.  Some FTP servers
        *                  require this.
  @@ -1008,10 +1005,10 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending the
        *      command or receiving the server reply.
  -     ***/
  -    public int stou(String filename) throws IOException
  +     */
  +    public int stou(String pathname) throws IOException
       {
  -        return sendCommand(FTPCommand.STOU, filename);
  +        return sendCommand(FTPCommand.STOU, pathname);
       }
   
       /***
  
  
  
  1.15      +18 -23    jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FTPClient.java	22 Dec 2003 22:11:26 -0000	1.14
  +++ FTPClient.java	29 Dec 2003 19:42:44 -0000	1.15
  @@ -399,7 +399,7 @@
       }
   
   
  -    /***
  +    /**
        * Establishes a data connection with the FTP server, returning
        * a Socket for the connection if successful.  If a restart
        * offset has been set with {@link #setRestartOffset(long)},
  @@ -408,7 +408,7 @@
        * mode connections also cause a local PORT command to be issued.
        * <p>
        * @param command  The text representation of the FTP command to send.
  -     * @param args The arguments to the FTP command.  If this parameter is
  +     * @param arg The arguments to the FTP command.  If this parameter is
        *             set to null, then the command is sent with no argument.
        * @return A Socket corresponding to the established data connection.
        *         Null is returned if an FTP protocol error is reported at
  @@ -416,7 +416,7 @@
        *         the connection.
        * @exception IOException  If an I/O error occurs while either sending a
        *      command to the server or receiving a reply from the server.
  -     ***/
  +     */
       protected Socket _openDataConnection_(int command, String arg)
         throws IOException
       {
  @@ -1487,7 +1487,7 @@
           return __storeFileStream(FTPCommand.STOU, remote);
       }
   
  -    /***
  +    /**
        * Stores a file on the server using a unique name assigned by the
        * server and taking input from the given InputStream.  This method does
        * NOT close the given
  @@ -1495,7 +1495,6 @@
        * the file are transparently converted to the NETASCII format (i.e.,
        * you should not attempt to create a special InputStream to do this).
        * <p>
  -     * @param remote  The name to give the remote file.
        * @param local   The local InputStream from which to read the file.
        * @return True if successfully completed, false if not.
        * @exception FTPConnectionClosedException
  @@ -1510,13 +1509,13 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending a
        *      command to the server or receiving a reply from the server.
  -     ***/
  +     */
       public boolean storeUniqueFile(InputStream local) throws IOException
       {
           return __storeFile(FTPCommand.STOU, null, local);
       }
   
  -    /***
  +    /**
        * Returns an OutputStream through which data can be written to store
        * a file on the server using a unique name assigned by the server.
        * If the current file type
  @@ -1529,7 +1528,6 @@
        * <a href="#completePendingCommand"> completePendingCommand </a> and
        * check its return value to verify success.
        * <p>
  -     * @param remote  The name to give the remote file.
        * @return An OutputStream through which the remote file can be written.  If
        *      the data connection cannot be opened (e.g., the file does not
        *      exist), null is returned (in which case you may check the reply
  @@ -1541,7 +1539,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending a
        *      command to the server or receiving a reply from the server.
  -     ***/
  +     */
       public OutputStream storeUniqueFileStream() throws IOException
       {
           return __storeFileStream(FTPCommand.STOU, null);
  @@ -1566,11 +1564,11 @@
       }
   
   
  -    /***
  +    /**
        * Reserve space on the server for the next file transfer.
        * <p>
        * @param bytes  The number of bytes which the server should allocate.
  -     * @param bytes  The size of a file record.
  +     * @param recordSize  The size of a file record.
        * @return True if successfully completed, false if not.
        * @exception FTPConnectionClosedException
        *      If the FTP server prematurely closes the connection as a result
  @@ -1579,7 +1577,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending a
        *      command to the server or receiving a reply from the server.
  -     ***/
  +     */
       public boolean allocate(int bytes, int recordSize) throws IOException
       {
           return FTPReply.isPositiveCompletion(allo(bytes, recordSize));
  @@ -1759,10 +1757,9 @@
       }
   
   
  -    /***
  +    /**
        * Send a site specific command.
  -     * <p>
  -     * @param argument  The site specific command and arguments.
  +     * @param arguments The site specific command and arguments.
        * @return True if successfully completed, false if not.
        * @exception FTPConnectionClosedException
        *      If the FTP server prematurely closes the connection as a result
  @@ -1771,7 +1768,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending a
        *      command to the server or receiving a reply from the server.
  -     ***/
  +     */
       public boolean sendSiteCommand(String arguments) throws IOException
       {
           return FTPReply.isPositiveCompletion(site(arguments));
  @@ -1826,11 +1823,10 @@
       }
   
   
  -    /***
  +    /**
        * Fetches the help information for a given command from the server and
        * returns the full string.
  -     * <p>
  -     * @param  The command on which to ask for help.
  +     * @param command The command on which to ask for help.
        * @return The command help string obtained from the server.  null if the
        *       information could not be obtained.
        * @exception FTPConnectionClosedException
  @@ -1840,7 +1836,7 @@
        *      as an IOException or independently as itself.
        * @exception IOException  If an I/O error occurs while either sending a
        *  command to the server or receiving a reply from the server.
  -     ***/
  +     */
       public String listHelp(String command) throws IOException
       {
           if (FTPReply.isPositiveCompletion(help(command)))
  @@ -2098,7 +2094,7 @@
        *         <code> parser </code> parameter.   Null will be returned if a
        *         data connection cannot be opened.  If the current working directory
        *         contains no files, an empty array will be the return.
  -     * @example <pre>
  +     * <pre>
        *    FTPClient f=FTPClient();
        *    f.connect(server);
        *    f.login(username, password);
  @@ -2122,8 +2118,7 @@
        *                   command to the server or receiving a reply from the server.
        * @see FTPFileList
        */
  -    public FTPFileList createFileList(FTPFileEntryParser parser)
  -    throws IOException
  +    public FTPFileList createFileList(FTPFileEntryParser parser) throws IOException
       {
           return createFileList(null, parser);
       }
  
  
  
  1.4       +3 -5      jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPCommand.java
  
  Index: FTPCommand.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPCommand.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FTPCommand.java	26 Jan 2003 00:21:43 -0000	1.3
  +++ FTPCommand.java	29 Dec 2003 19:42:44 -0000	1.4
  @@ -149,18 +149,16 @@
                                             "NLST", "SITE", "SYST", "STAT", "HELP", "NOOP"
                                         };
   
  -
  -    /***
  +    /**
        * Retrieve the FTP protocol command string corresponding to a specified
        * command code.
        * <p>
  -     * @param The command code.
  +     * @param command The command code.
        * @return The FTP protcol command string corresponding to a specified
        *         command code.
  -     ***/
  +     */
       public static final String getCommand(int command)
       {
           return _commands[command];
       }
  -
   }
  
  
  
  1.4       +3 -4      jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFile.java
  
  Index: FTPFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFile.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FTPFile.java	26 Jan 2003 00:21:43 -0000	1.3
  +++ FTPFile.java	29 Dec 2003 19:42:44 -0000	1.4
  @@ -240,11 +240,10 @@
       }
   
   
  -    /***
  +    /**
        * Set the file size in bytes.
  -     * <p>
  -     * @param The file size in bytes.
  -     ***/
  +     * @param size The file size in bytes.
  +     */
       public void setSize(long size)
       {
           _size = size;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org