org.apache.ftpserver
Class FtpUser

java.lang.Object
  extended by org.apache.ftpserver.usermanager.User
      extended by org.apache.ftpserver.FtpUser
All Implemented Interfaces:
Serializable

public class FtpUser
extends User
implements Serializable

Ftp user class. It handles all user specific file system task. It supports user virtual root directory.

Author:
Rana Bhattacharyya
See Also:
Serialized Form

Field Summary
static String ANONYMOUS
           
 
Fields inherited from class org.apache.ftpserver.usermanager.User
ATTR_ENABLE, ATTR_HOME, ATTR_LOGIN, ATTR_MAX_DOWNLOAD_RATE, ATTR_MAX_IDLE_TIME, ATTR_MAX_UPLOAD_RATE, ATTR_PASSWORD, ATTR_WRITE_PERM
 
Constructor Summary
FtpUser()
          Constructor - does nothing.
 
Method Summary
 boolean getIsAnonymous()
          Is an anonymous user?
 char getMode()
          Get the transfer mode.
 OutputStream getOutputStream(OutputStream os)
          Get output stream.
 char getStructure()
          Get the file structure.
 char getType()
          Get the user data type.
 boolean setMode(char md)
          Set the transfer type.
 boolean setStructure(char stru)
          Set the file structure.
 boolean setType(char type)
          Set the data type.
 
Methods inherited from class org.apache.ftpserver.usermanager.User
equals, getClientAddress, getEnabled, getLastAccessTime, getLoginTime, getMaxDownloadRate, getMaxIdleTime, getMaxUploadRate, getName, getPassword, getSessionId, getVirtualDirectory, hasLoggedIn, hitUser, isActive, isActive, login, logout, setClientAddress, setEnabled, setMaxDownloadRate, setMaxIdleTime, setMaxUploadRate, setName, setPassword, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANONYMOUS

public static final String ANONYMOUS
See Also:
Constant Field Values
Constructor Detail

FtpUser

public FtpUser()
Constructor - does nothing.

Method Detail

getType

public char getType()
Get the user data type.


setType

public boolean setType(char type)
Set the data type. Supported types are A (ascii) and I (binary).

Returns:
true if success

getStructure

public char getStructure()
Get the file structure.


setStructure

public boolean setStructure(char stru)
Set the file structure. Supported structure type is F (file).

Returns:
true if success

getMode

public char getMode()
Get the transfer mode.


setMode

public boolean setMode(char md)
Set the transfer type. Supported transfer type is S (stream).

Returns:
true if success

getOutputStream

public OutputStream getOutputStream(OutputStream os)
Get output stream. Returns ftpserver.util.AsciiOutputStream if the transfer type is ASCII.


getIsAnonymous

public boolean getIsAnonymous()
Is an anonymous user?



Copyright © 2001-2012 Codehaus. All Rights Reserved.