commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r440725 - in /jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp: DefaultFTPFileListParser.java FTPClient.java FTPFileEntryParserImpl.java FTPFileListParser.java FTPFileListParserImpl.java
Date Wed, 06 Sep 2006 14:34:00 GMT
Author: rwinston
Date: Wed Sep  6 07:33:59 2006
New Revision: 440725

URL: http://svn.apache.org/viewvc?view=rev&rev=440725
Log:
Remove deprecated classes and methods

Removed:
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/DefaultFTPFileListParser.java
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileListParser.java
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileListParserImpl.java
Modified:
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPClient.java
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java

Modified: jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPClient.java?view=diff&rev=440725&r1=440724&r2=440725
==============================================================================
--- jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPClient.java
(original)
+++ jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Wed Sep  6 07:33:59 2006
@@ -2460,203 +2460,7 @@
         return null;
     }
 
-    /**
-     * Using a programmer specified <code> FTPFileListParser </code>, obtain
a
-     * list of file information for a directory or information for
-     * just a single file.  This information is obtained through the LIST
-     * command.  The contents of the returned array is determined by the
-     * <code> FTPFileListParser </code> used.
-     * The server may or may not expand glob expressions.  You should avoid
-     * using glob expressions because the return format for glob listings
-     * differs from server to server and will likely cause this method to fail.
-     * <p>
-     * @param parser The <code> FTPFileListParser </code> that should be
-     *         used to parse the server file listing.
-     * @param pathname  The file or directory to list.
-     * @return The list of file information contained in the given path in
-     *         the format determined by the <code> parser </code> parameter.
-     *         <p><b> 
-     * 		   NOTE:</b> This array may contain null members if any of the 
-     *         individual file listings failed to parse.  The caller should 
-     *         check each entry for null before referencing it.
-     * @exception FTPConnectionClosedException
-     *      If the FTP server prematurely closes the connection as a result
-     *      of the client being idle or some other reason causing the server
-     *      to send FTP reply code 421.  This exception may be caught either
-     *      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.
-     *
-     * @return The list of file information contained in the given path in
-     *         the format determined by<code> parserKey </code>parameter.
-     *         <p><b> 
-     * 		   NOTE:</b> This array may contain null members if any of the 
-     *         individual file listings failed to parse.  The caller should 
-     *         check each entry for null before referencing it.
-     *
-     * @exception IOException
-     * @since 5 Jan 2004
-     * @deprecated use listFiles(String parserKey, String pathname) instead
-     */
-    public FTPFile[] listFiles(FTPFileListParser parser, String pathname)
-    throws IOException
-    {
-        Socket socket;
-        FTPFile[] results;
 
-        if ((socket = _openDataConnection_(FTPCommand.LIST, getListArguments(pathname)))
== null)
-            return new FTPFile[0];
-
-        results = parser.parseFileList(socket.getInputStream(), getControlEncoding());
-
-        socket.close();
-
-        completePendingCommand();
-
-        return results;
-    }
-
-
-    /**
-     * Using a programmer specified <code> FTPFileListParser </code>,
-     * obtain a list of file information for the current working directory.
-     * This information is obtained through the LIST command.
-     * The contents of the array returned is determined by the
-     * <code> FTPFileListParser </code> used.
-     * <p>
-     *
-     * @param parser The <code> FTPFileListParser </code> that should be
-     *               used to parse the server file listing.
-     *
-     * @return The list of file information contained in the given path in
-     *         the format determined by the <code> parser </code> parameter.
-     *         <p><b> 
-     * 		   NOTE:</b> This array may contain null members if any of the 
-     *         individual file listings failed to parse.  The caller should 
-     *         check each entry for null before referencing it.
-     * @exception FTPConnectionClosedException
-     *                   If the FTP server prematurely closes the connection as a result
-     *                   of the client being idle or some other reason causing the server
-     *                   to send FTP reply code 421.  This exception may be caught either
-     *                   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.
-     * @exception IOException
-     * @since 5 Jan 2004
-     * @deprecated use listFiles(String parserKey) instead.
-     */
-    public FTPFile[] listFiles(FTPFileListParser parser) throws IOException
-    {
-        return listFiles(parser, null);
-    }
-
-
-    /**
-     * Using a programmer specified <code> FTPFileEntryParser </code>,
-     * initialize an object containing a raw file information for the
-     * current working directory.  This information is obtained through
-     * the LIST command.  This object is then capable of being iterated to
-     * return a sequence of FTPFile objects with information filled in by the
-     * <code> FTPFileEntryParser </code> used.
-     * <p>
-     * The server may or may not expand glob expressions.  You should avoid
-     * using glob expressions because the return format for glob listings
-     * differs from server to server and will likely cause this method to fail.
-     * <p>
-     * This method differs from using the listFiles() methods in that
-     * expensive FTPFile objects are not created until needed which may be
-     * an advantage on large lists.
-     *
-     * @param parser The <code> FTPFileEntryParser </code> that should be
-     *               used to parse each server file listing.
-     *
-     * @return An iteratable object that holds the raw information and is
-     *         capable of providing parsed FTPFile objects, one for each file containing
-     *         information contained in the given path in the format determined by the
-     *         <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.
-     * <pre>
-     *    FTPClient f=FTPClient();
-     *    f.connect(server);
-     *    f.login(username, password);
-     *    FTPFileList list = f.createFileList(directory, parser);
-     *    FTPFileIterator iter = list.iterator();
-     *
-     *    while (iter.hasNext()) {
-     *       FTPFile[] files = iter.getNext(25);  // "page size" you want
-     *       //do whatever you want with these files, display them, etc.
-     *       //expensive FTPFile objects not created until needed.
-     *    }
-     * </pre>
-     *
-     * @exception FTPConnectionClosedException
-     *                   If the FTP server prematurely closes the connection as a result
-     *                   of the client being idle or some other reason causing the server
-     *                   to send FTP reply code 421.  This exception may be caught either
-     *                   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.
-     * @deprecated - use initiateListParsing(FTPFileEntryParser) method instead.
-     * @see FTPFileList
-     */
-    public FTPFileList createFileList(FTPFileEntryParser parser) throws IOException
-    {
-        return createFileList(null, parser);
-    }
-
-    /**
-     * Using a programmer specified <code> FTPFileEntryParser </code>,
-     * initialize an object containing a raw file information for a directory
-     * or information for a single file.  This information is obtained through
-     * the LIST command.  This object is then capable of being iterated to
-     * return a sequence of FTPFile objects with information filled in by the
-     * <code> FTPFileEntryParser </code> used.
-     * The server may or may not expand glob expressions.  You should avoid
-     * using glob expressions because the return format for glob listings
-     * differs from server to server and will likely cause this method to fail.
-     * <p>
-     * @param parser The <code> FTPFileEntryParser </code> that should be
-     *         used to parse each server file listing.
-     * @param pathname  The file or directory to list.
-     * @return An iteratable object that holds the raw information and is
-     * capable of providing parsed FTPFile objects, one for each file containing
-     * information contained in the given path in the format determined by the
-     * <code> parser </code> parameter.  Null will be returned if a
-     * data connection cannot be opened.  If the supplied path contains
-     * no files, an empty array will be the return.
-     * @exception FTPConnectionClosedException
-     *      If the FTP server prematurely closes the connection as a result
-     *      of the client being idle or some other reason causing the server
-     *      to send FTP reply code 421.  This exception may be caught either
-     *      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.
-     * @deprecated - use initiateListParsing(String, FTPFileEntryParser)
-     * method instead.
-     * @see FTPFileList
-     */
-    public FTPFileList createFileList(String pathname,
-            FTPFileEntryParser parser)
-    throws IOException
-    {
-        Socket socket;
-
-        if ((socket = _openDataConnection_(FTPCommand.LIST, getListArguments(pathname)))
== null)
-        {
-            return null;
-        }
-
-        FTPFileList list = FTPFileList.create(socket.getInputStream(), parser);
-
-        socket.close();
-
-        completePendingCommand();
-        return list;
-    }
-    
     /**
      * Set the internal buffer size.
      *  

Modified: jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java?view=diff&rev=440725&r1=440724&r2=440725
==============================================================================
--- jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
(original)
+++ jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/main/java/org/apache/commons/net/ftp/FTPFileEntryParserImpl.java
Wed Sep  6 07:33:59 2006
@@ -27,7 +27,7 @@
  *
  */
 public abstract class FTPFileEntryParserImpl
-    implements FTPFileEntryParser, FTPFileListParser
+    implements FTPFileEntryParser
 {
     /**
      * The constructor for a FTPFileEntryParserImpl object.



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


Mime
View raw message