commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject cvs commit: jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser MatchApparatus.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java
Date Fri, 03 May 2002 14:52:30 GMT
brekke      02/05/03 07:52:30

  Modified:    net/src/java/org/apache/commons/net/ftp/ftp2 FTPClient2.java
                        FTPFileEntryParser.java FTPFileIterator.java
                        FTPFileList.java
               net/src/java/org/apache/commons/net/ftp/ftp2/parser
                        MatchApparatus.java NTFTPEntryParser.java
                        OS2FTPEntryParser.java UnixFTPEntryParser.java
                        VMSFTPEntryParser.java
  Log:
  Patch from Steve Cohen:
  
  After building Maven (instead of using distributed binary) I
  can finally see the Checkstyle output without committing first, so could
  REALLY clean it up this time.  The only things left in the new files are places
  where checkstyle may be in error (as reported yesterday) or a few cases of
  comment that are lines of actual sample FTP output longer than 80 chars which
  I refuse to split.
  
  Revision  Changes    Path
  1.3       +6 -7      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPClient2.java
  
  Index: FTPClient2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPClient2.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTPClient2.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ FTPClient2.java	3 May 2002 14:52:29 -0000	1.3
  @@ -73,18 +73,18 @@
    * way.
    *
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: FTPClient2.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: FTPClient2.java,v 1.3 2002/05/03 14:52:29 brekke Exp $
    */
   public class FTPClient2 extends FTPClient
   {
  -    private FTPFileEntryParser __fileEntryParser;
  +    private FTPFileEntryParser defaultParser;
       /**
        * The only constructor for this class.
        */
       public FTPClient2()
       {
           super();
  -        __fileEntryParser = new UnixFTPEntryParser();
  +        this.defaultParser = new UnixFTPEntryParser();
       }
       
       /**
  @@ -146,7 +146,7 @@
        */
       public FTPFile[] listFiles(String pathname) throws IOException
       {
  -        return listFiles(__fileEntryParser, pathname);
  +        return listFiles(this.defaultParser, pathname);
       }
       
       /**
  @@ -170,7 +170,7 @@
        */
       public FTPFile[] listFiles() throws IOException
       {
  -        return listFiles(__fileEntryParser, null);
  +        return listFiles(this.defaultParser, null);
       }
   
       /**
  @@ -184,7 +184,6 @@
        * 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 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 
  @@ -202,7 +201,7 @@
        */
       public FTPFileList createFileList() throws IOException
       {
  -        return createFileList(null, this.__fileEntryParser);
  +        return createFileList(null, this.defaultParser);
       }
   
       /**
  @@ -234,7 +233,7 @@
        */
       public FTPFileList createFileList(String basedir) throws IOException
       {
  -        return createFileList(basedir, this.__fileEntryParser);
  +        return createFileList(basedir, this.defaultParser);
       }
   
       /**
  
  
  
  1.3       +0 -0      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPFileEntryParser.java
  
  Index: FTPFileEntryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPFileEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTPFileEntryParser.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ FTPFileEntryParser.java	3 May 2002 14:52:29 -0000	1.3
  @@ -65,7 +65,7 @@
    * if necessary, subclass FTPFile.
    *
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: FTPFileEntryParser.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: FTPFileEntryParser.java,v 1.3 2002/05/03 14:52:29 brekke Exp $
    * @see org.apache.commons.net.ftp.FTPFile
    * @see FTPClient2#listFiles
    */
  
  
  
  1.3       +47 -43    jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPFileIterator.java
  
  Index: FTPFileIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPFileIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTPFileIterator.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ FTPFileIterator.java	3 May 2002 14:52:29 -0000	1.3
  @@ -65,7 +65,7 @@
    * be receieved as an array of any requested number of entries or all of them.
    *
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: FTPFileIterator.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: FTPFileIterator.java,v 1.3 2002/05/03 14:52:29 brekke Exp $
    * @see org.apache.commons.net.ftp.ftp2.FTPFileList
    */
   public class FTPFileIterator
  @@ -149,24 +149,27 @@
       }
   
       /**
  -     * Returns an array of at most <code>howMany</code> FTPFile objects
  -     * starting at this iterator's current position  within its associated
  -     * list. If fewer than <code>howMany</code> such elements are available,
  -     * the returned array will have a length equal to the number of entries
  -     * at and after after the current position.  If no such entries
  -     * are found, this array will have a length of 0.
  -     *
  -     * After this method is called the current position is advanced by either
  -     * <code>howMany</code> or the number of entries available after the
  -     * iterator, whichever is fewer.
  -     * @param howMany the maximum number of entries we want to get.  A 0
  +     * Returns an array of at most <code>quantityRequested</code> FTPFile 
  +     * objects starting at this iterator's current position  within its 
  +     * associated list. If fewer than <code>quantityRequested</code> such 
  +     * elements are available, the returned array will have a length equal 
  +     * to the number of entries at and after after the current position.  
  +     * If no such entries are found, this array will have a length of 0.
  +     * 
  +     * After this method is called the current position is advanced by 
  +     * either <code>quantityRequested</code> or the number of entries 
  +     * available after the iterator, whichever is fewer.
  +     * 
  +     * @param quantityRequested
  +     * the maximum number of entries we want to get.  A 0
        * passed here is a signal to get ALL the entries.
  -     * @return  an array of at most <code>howMany</code> FTPFile objects
  -     * starting at the current position of this iterator within its list
  -     * and at least the number of elements which  exist in the list at and
  -     * after its current position.
  +     * 
  +     * @return an array of at most <code>quantityRequested</code> FTPFile 
  +     * objects starting at the current position of this iterator within its 
  +     * list and at least the number of elements which  exist in the list at 
  +     * and after its current position.
        */
  -    public FTPFile[] getNext(int howMany)
  +    public FTPFile[] getNext(int quantityRequested)
       {
   
           // if we haven't gotten past the initial junk do so.
  @@ -184,15 +187,15 @@
           // now that we know the maximum we can possibly get,
           // resolve a 0 request to ask for that many.
   
  -        int _howMany = (howMany == 0) ? max : howMany;
  -        _howMany = (_howMany + this.itemptr < this.rawlines.size())
  -                   ? _howMany
  +        int howMany = (quantityRequested == 0) ? max : quantityRequested;
  +        howMany = (howMany + this.itemptr < this.rawlines.size())
  +                   ? howMany
                      : this.rawlines.size() - this.itemptr;
   
  -        FTPFile[] output = new FTPFile[_howMany];
  +        FTPFile[] output = new FTPFile[howMany];
   
           for (int i = 0, e = this.firstGoodEntry + this.itemptr ;
  -                i < _howMany; i++, e++)
  +                i < howMany; i++, e++)
           {
               output[i] = parseFTPEntry((String) this.rawlines.elementAt(e));
               this.itemptr++;
  @@ -249,34 +252,35 @@
       }
   
       /**
  -     * Returns an array of at most <code>howMany</code> FTPFile objects
  -     * starting at the position preceding this iterator's current position
  -     * within its associated list. If fewer than <code>howMany</code> such
  -     * elements are available, the returned array will have a length
  -     * equal to the number of entries after the iterator.  If no such entries
  -     * are found, this array will have a length of 0.  The entries will be
  -     * ordered in the same order as the list, not reversed.
  -     *
  -     * After this method is called the current position is moved back by either
  -     * <code>howMany</code> or the number of entries available before the
  -     * current position, whichever is fewer.
  -     * @param howMany the maximum number of entries we want to get.  A 0
  -     * passed here is a signal to get ALL the entries.
  -     * @return  an array of at most <code>howMany</code> FTPFile objects
  -     * starting at the position preceding the current position of this
  -     * iterator within its list and at least the number of elements which
  +     * Returns an array of at most <code>quantityRequested</code> FTPFile 
  +     * objects starting at the position preceding this iterator's current 
  +     * position within its associated list. If fewer than 
  +     * <code>quantityRequested</code> such elements are available, the 
  +     * returned array will have a length equal to the number of entries after
  +     * the iterator.  If no such entries are found, this array will have a 
  +     * length of 0.  The entries will be ordered in the same order as the 
  +     * list, not reversed.
  +     *
  +     * After this method is called the current position is moved back by 
  +     * either <code>quantityRequested</code> or the number of entries 
  +     * available before the current position, whichever is fewer.
  +     * @param quantityRequested the maximum number of entries we want to get.  
  +     * A 0 passed here is a signal to get ALL the entries.
  +     * @return  an array of at most <code>quantityRequested</code> FTPFile

  +     * objects starting at the position preceding the current position of 
  +     * this iterator within its list and at least the number of elements which
        * exist in the list prior to its current position.
        */
  -    public FTPFile[] getPrevious(int howMany)
  +    public FTPFile[] getPrevious(int quantityRequested)
       {
  -        int how_many = howMany;
  -        // can't retreat further than we've come.
  -        if (how_many > this.itemptr)
  +        int howMany = quantityRequested;
  +        // can't retreat further than we've previously advanced
  +        if (howMany > this.itemptr)
           {
  -            how_many = this.itemptr;
  +            howMany = this.itemptr;
           }
  -        FTPFile[] output = new FTPFile[how_many];
  -        for (int i = how_many, e = this.firstGoodEntry + this.itemptr; i > 0; )
  +        FTPFile[] output = new FTPFile[howMany];
  +        for (int i = howMany, e = this.firstGoodEntry + this.itemptr; i > 0; )
           {
               output[--i] = parseFTPEntry((String) this.rawlines.elementAt(--e));
               this.itemptr--;
  
  
  
  1.3       +8 -4      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPFileList.java
  
  Index: FTPFileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/FTPFileList.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FTPFileList.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ FTPFileList.java	3 May 2002 14:52:29 -0000	1.3
  @@ -77,7 +77,7 @@
    * which required a bigger memory hit.
    *
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: FTPFileList.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: FTPFileList.java,v 1.3 2002/05/03 14:52:29 brekke Exp $
    * @see FTPClient2#listFiles
    * @see FTPClient2#createFileList
    */
  @@ -170,7 +170,8 @@
       /**
        * Package private accessor for the collection of raw input lines.
        * 
  -     * @return vector containing all the raw input lines returned from the FTP server
  +     * @return vector containing all the raw input lines returned from the FTP 
  +     * server
        */
       Vector getLines()
       {
  @@ -178,8 +179,8 @@
       }
   
       /**
  -     * create an iterator over this list using the parser with which this list was
  -     * initally created
  +     * create an iterator over this list using the parser with which this list 
  +     * was initally created
        * 
        * @return an iterator over this list using the list's default parser.
        */
  @@ -188,7 +189,10 @@
           return new FTPFileIterator(this);
       }
       /**
  -     * create an iterator over this list using the supplied parser 
  +     * create an iterator over this list using the supplied parser
  +     * 
  +     * @param parser The user-supplied parser with which the list is to be 
  +     * iterated, may be different from this list's default parser.
        * 
        * @return an iterator over this list using the supplied parser.
        */
  
  
  
  1.3       +16 -10    jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/MatchApparatus.java
  
  Index: MatchApparatus.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/MatchApparatus.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MatchApparatus.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ MatchApparatus.java	3 May 2002 14:52:30 -0000	1.3
  @@ -67,7 +67,7 @@
    * It is also designed to encapsulate access to the oro.text.regex
    * classes in one place.
    * @author <a href="mailto:scohen@ignitesports.com">Steve Cohen</a>
  - * @version $Id: MatchApparatus.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: MatchApparatus.java,v 1.3 2002/05/03 14:52:30 brekke Exp $
    */
   abstract class MatchApparatus
   {
  @@ -79,23 +79,28 @@
       /**
        * The constructor for a MatchApparatus object.
        * 
  -     * @param regex  The regular expression with which this object is initialized.
  +     * @param regex  The regular expression with which this object is 
  +     * initialized.
        * 
        * @exception IllegalArgumentException
  -     * Thrown if the regular expression is unparseable.  Should not be seen in normal
  -     * conditions.  It it is seen, this is a sign that a subclass has been created with
  -     * a bad regular expression.   Since the parser must be created before use, this 
  -     * means that any bad parser subclasses created from this will bomb very quickly,
  -     * leading to easy detection.  
  +     * Thrown if the regular expression is unparseable.  Should not be seen in 
  +     * normal conditions.  It it is seen, this is a sign that a subclass has 
  +     * been created with a bad regular expression.   Since the parser must be 
  +     * created before use, this means that any bad parser subclasses created 
  +     * from this will bomb very quickly,  leading to easy detection.  
        */
       MatchApparatus(String regex) 
       {
  -        try {
  +        try 
  +        {
               this.prefix = "[" + getClass().getName() + "] ";
               this.matcher = new Perl5Matcher();
               this.pattern = new Perl5Compiler().compile(regex);
  -        }  catch (MalformedPatternException e) {
  -            throw new IllegalArgumentException ("Unparseable regex supplied:  " + regex);
  +        } 
  +        catch (MalformedPatternException e) 
  +        {
  +            throw new IllegalArgumentException (
  +                "Unparseable regex supplied:  " + regex);
           }
       }
   
  @@ -148,7 +153,8 @@
       }
   
       /**
  -     * For debugging purposes - returns a string shows each match group by number.
  +     * For debugging purposes - returns a string shows each match group by 
  +     * number.
        * 
        * @return a string shows each match group by number.
        */
  
  
  
  1.3       +6 -6      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/NTFTPEntryParser.java
  
  Index: NTFTPEntryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/NTFTPEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NTFTPEntryParser.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ NTFTPEntryParser.java	3 May 2002 14:52:30 -0000	1.3
  @@ -91,15 +91,15 @@
    * object. The only thing not implemented at this time is the file
    * permissions, but I can do it if there is a real need for it.
    * <P>
  - * !NOTE/WARNING!:Before you pass the parser to listFiles, make sure you are in the
  - * directory that you need to be. This parser will return the filtered
  + * !NOTE/WARNING!:Before you pass the parser to listFiles, make sure you are in 
  + * the directory that you need to be. This parser will return the filtered
    * files from the directory it is in. This becomes crucial specialy if your
    * goal is to delete the output of the parser.
    * <P>
    *
    * @author  <a href="Winston.Ojeda@qg.com">Winston Ojeda</a>
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: NTFTPEntryParser.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: NTFTPEntryParser.java,v 1.3 2002/05/03 14:52:30 brekke Exp $
    * @see org.apache.commons.net.ftp.FTPFileListParser
    */
   public class NTFTPEntryParser
  @@ -120,9 +120,9 @@
        * The sole constructor for an NTFTPEntryParser object.
        * 
        * @exception IllegalArgumentException
  -     * Thrown if the regular expression is unparseable.  Should not be seen under 
  -     * normal conditions.  It it is seen, this is a sign that <code>REGEX</code>
is 
  -     * not a valid regular expression.
  +     * Thrown if the regular expression is unparseable.  Should not be seen 
  +     * under normal conditions.  It it is seen, this is a sign that 
  +     * <code>REGEX</code> is  not a valid regular expression.
        */
       public NTFTPEntryParser() 
       {
  @@ -137,7 +137,7 @@
        * returned, otherwise a <code> FTPFile </code> instance representing the
        * files in the directory is returned.
        * <p>
  -     * @param listEntry A line of text from the file listing
  +     * @param entry A line of text from the file listing
        * @return An FTPFile instance corresponding to the supplied entry
        */
       public FTPFile parseFTPEntry(String entry)
  
  
  
  1.3       +4 -17     jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/OS2FTPEntryParser.java
  
  Index: OS2FTPEntryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/OS2FTPEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OS2FTPEntryParser.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ OS2FTPEntryParser.java	3 May 2002 14:52:30 -0000	1.3
  @@ -98,7 +98,7 @@
    * <P>
    * @author  <a href="Winston.Ojeda@qg.com">Winston Ojeda</a>
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: OS2FTPEntryParser.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: OS2FTPEntryParser.java,v 1.3 2002/05/03 14:52:30 brekke Exp $
    * @see org.apache.commons.net.ftp.FTPFileListParser
    */
   public class OS2FTPEntryParser
  @@ -120,9 +120,9 @@
        * The sole constructor for a OS2FTPEntryParser object.
        * 
        * @exception IllegalArgumentException
  -     * Thrown if the regular expression is unparseable.  Should not be seen under 
  -     * normal conditions.  It it is seen, this is a sign that <code>REGEX</code>
is 
  -     * not a valid regular * expression.
  +     * Thrown if the regular expression is unparseable.  Should not be seen 
  +     * under normal conditions.  It it is seen, this is a sign that 
  +     * <code>REGEX</code> is  not a valid regular expression.
        */
       public OS2FTPEntryParser() 
       {
  @@ -131,26 +131,13 @@
   
   
       /**
  -     * Returns the properly formatted regular expression string used to do
  -     * the pattern matching for an OS2 FTP system.
  -     *
  -     * @return the string used to build the regular expression pattern
  -     * for matching
  -     */
  -    protected String getRegEx()
  -    {
  -        return REGEX;
  -    }
  -
  -
  -    /**
        * Parses a line of an OS2 FTP server file listing and converts it into a
        * usable format in the form of an <code> FTPFile </code> instance.  If
the
        * file listing line doesn't describe a file, <code> null </code> is
        * returned, otherwise a <code> FTPFile </code> instance representing the
        * files in the directory is returned.
        * <p>
  -     * @param listEntry A line of text from the file listing
  +     * @param entry A line of text from the file listing
        * @return An FTPFile instance corresponding to the supplied entry
        */
       public FTPFile parseFTPEntry(String entry)
  
  
  
  1.3       +4 -4      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/UnixFTPEntryParser.java
  
  Index: UnixFTPEntryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/UnixFTPEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UnixFTPEntryParser.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ UnixFTPEntryParser.java	3 May 2002 14:52:30 -0000	1.3
  @@ -63,7 +63,7 @@
    * DefaultFTPListParser, but adapted to use regular expressions and to fit the
    * new FTPFileEntryParser interface.
    * @author <a href="mailto:scohen@ignitesports.com">Steve Cohen</a>
  - * @version $Id: UnixFTPEntryParser.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: UnixFTPEntryParser.java,v 1.3 2002/05/03 14:52:30 brekke Exp $
    */
   public class UnixFTPEntryParser
               extends MatchApparatus implements FTPFileEntryParser
  @@ -87,9 +87,9 @@
        * The sole constructor for a UnixFTPEntryParser object.
        * 
        * @exception IllegalArgumentException
  -     * Thrown if the regular expression is unparseable.  Should not be seen under 
  -     * normal conditions.  It it is seen, this is a sign that <code>REGEX</code>
is 
  -     * not a valid regular expression.
  +     * Thrown if the regular expression is unparseable.  Should not be seen 
  +     * under normal conditions.  It it is seen, this is a sign that 
  +     * <code>REGEX</code> is  not a valid regular expression.
        */
       public UnixFTPEntryParser() 
       {
  @@ -103,7 +103,7 @@
        * <code> null </code> is returned, otherwise a <code> FTPFile </code>

        * instance representing the files in the directory is returned.
        * <p>
  -     * @param listEntry A line of text from the file listing
  +     * @param entry A line of text from the file listing
        * @return An FTPFile instance corresponding to the supplied entry
        */
       public FTPFile parseFTPEntry(String entry)
  
  
  
  1.3       +13 -24    jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/VMSFTPEntryParser.java
  
  Index: VMSFTPEntryParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/ftp/ftp2/parser/VMSFTPEntryParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VMSFTPEntryParser.java	30 Apr 2002 13:59:42 -0000	1.2
  +++ VMSFTPEntryParser.java	3 May 2002 14:52:30 -0000	1.3
  @@ -103,7 +103,7 @@
    * <P>
    * @author  <a href="Winston.Ojeda@qg.com">Winston Ojeda</a>
    * @author <a href="mailto:stevecoh1@attbi.com">Steve Cohen</a>
  - * @version $Id: VMSFTPEntryParser.java,v 1.2 2002/04/30 13:59:42 brekke Exp $
  + * @version $Id: VMSFTPEntryParser.java,v 1.3 2002/05/03 14:52:30 brekke Exp $
    * @see org.apache.commons.net.ftp.FTPFileFTPEntryParser
    */
   public class VMSFTPEntryParser
  @@ -137,9 +137,9 @@
        * <code>versioning</code> member false
        * 
        * @exception IllegalArgumentException
  -     * Thrown if the regular expression is unparseable.  Should not be seen under
  -     * normal conditions.  It it is seen, this is a sign that <code>REGEX</code>
is
  -     * not a valid regular expression.
  +     * Thrown if the regular expression is unparseable.  Should not be seen 
  +     * under normal conditions.  It it is seen, this is a sign that 
  +     * <code>REGEX</code> is  not a valid regular expression.
        */
       public VMSFTPEntryParser()
       {
  @@ -153,9 +153,9 @@
        * @param versioning Value to which versioning is to be set.
        * 
        * @exception IllegalArgumentException
  -     * Thrown if the regular expression is unparseable.  Should not be seen under
  -     * normal conditions.  It it is seen, this is a sign that <code>REGEX</code>
is
  -     * not a valid regular expression.
  +     * Thrown if the regular expression is unparseable.  Should not be seen 
  +     * under normal conditions.  It it is seen, this is a sign that 
  +     * <code>REGEX</code> is  not a valid regular expression.
        */
       public VMSFTPEntryParser(boolean versioning)
       {
  @@ -163,21 +163,6 @@
           this.versioning = versioning;
       }
   
  -
  -
  -    /**
  -     * Returns the properly formatted regular expression string used to do
  -     * the pattern matching for a VMS FTP system.
  -     *
  -     * @return the string used to build the regular expression pattern
  -     * for matching
  -     */
  -    protected String getRegEx()
  -    {
  -        return REGEX;
  -    }
  -
  -    
       /**
        * Parses a line of a VMS FTP server file listing and converts it into a
        * usable format in the form of an <code> FTPFile </code> instance.  If
the
  @@ -185,7 +170,7 @@
        * returned, otherwise a <code> FTPFile </code> instance representing the
        * files in the directory is returned.
        * <p>
  -     * @param listEntry A line of text from the file listing
  +     * @param entry A line of text from the file listing
        * @return An FTPFile instance corresponding to the supplied entry
        */
       public FTPFile parseFTPEntry(String entry)
  @@ -214,7 +199,9 @@
               if (name.lastIndexOf(".DIR") != -1) 
               {
                   f.setType(FTPFile.DIRECTORY_TYPE);
  -            } else {
  +            } 
  +            else 
  +            {
                   f.setType(FTPFile.FILE_TYPE);
               }
               //set FTPFile name
  @@ -222,7 +209,9 @@
               if (versioning) 
               {
                   f.setName(name);
  -            } else {
  +            } 
  +            else 
  +            {
                   name = name.substring(0, name.lastIndexOf(";"));
                   f.setName(name);
               }
  
  
  

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


Mime
View raw message