avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver FtpUser.java
Date Mon, 01 Apr 2002 17:26:03 GMT
rana_b      02/04/01 09:26:03

  Modified:    ftpserver/src/java/org/apache/avalon/ftpserver FtpUser.java
  Log:
  parameterized admin name
  
  Revision  Changes    Path
  1.10      +11 -1     jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/FtpUser.java
  
  Index: FtpUser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/FtpUser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FtpUser.java	6 Mar 2002 13:54:40 -0000	1.9
  +++ FtpUser.java	1 Apr 2002 17:26:03 -0000	1.10
  @@ -9,6 +9,7 @@
   package org.apache.avalon.ftpserver;
   
   import java.io.OutputStream;
  +import java.io.BufferedOutputStream;
   import java.io.Serializable;
   
   import org.apache.avalon.ftpserver.util.AsciiOutputStream;
  @@ -24,11 +25,12 @@
   public
   class FtpUser extends User implements Serializable {
       
  +    public final static String ANONYMOUS = "anonymous";
  +    
       private char mcDataType    = 'A';
       private char mcStructure   = 'F';
       private char mcMode        = 'S';
       
  -
       /**
        * Constructor - does nothing.
        */
  @@ -102,10 +104,18 @@
        * if the transfer type is ASCII.
        */
       public OutputStream getOutputStream(OutputStream os) {
  +        os = new BufferedOutputStream(os);
           if(mcDataType == 'A') {
               os = new AsciiOutputStream(os);
           }
           return os;
  +    }
  +    
  +    /**
  +     * Is an anonymous user?
  +     */
  +    public boolean getIsAnonymous() {
  +        return ANONYMOUS.equals(getName());
       }
   }
   
  
  
  

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


Mime
View raw message