org.apache.ftpserver.ftplet
Class DefaultFtpReply

java.lang.Object
  extended by org.apache.ftpserver.ftplet.DefaultFtpReply
All Implemented Interfaces:
FtpReply
Direct Known Subclasses:
LocalizedFtpReply

public class DefaultFtpReply
extends Object
implements FtpReply

FTP reply object.

Author:
Apache MINA Project

Field Summary
 
Fields inherited from interface org.apache.ftpserver.ftplet.FtpReply
REPLY_110_RESTART_MARKER_REPLY, REPLY_120_SERVICE_READY_IN_NNN_MINUTES, REPLY_125_DATA_CONNECTION_ALREADY_OPEN, REPLY_150_FILE_STATUS_OKAY, REPLY_200_COMMAND_OKAY, REPLY_202_COMMAND_NOT_IMPLEMENTED, REPLY_211_SYSTEM_STATUS_REPLY, REPLY_212_DIRECTORY_STATUS, REPLY_213_FILE_STATUS, REPLY_214_HELP_MESSAGE, REPLY_215_NAME_SYSTEM_TYPE, REPLY_220_SERVICE_READY, REPLY_221_CLOSING_CONTROL_CONNECTION, REPLY_225_DATA_CONNECTION_OPEN_NO_TRANSFER_IN_PROGRESS, REPLY_226_CLOSING_DATA_CONNECTION, REPLY_227_ENTERING_PASSIVE_MODE, REPLY_230_USER_LOGGED_IN, REPLY_250_REQUESTED_FILE_ACTION_OKAY, REPLY_257_PATHNAME_CREATED, REPLY_331_USER_NAME_OKAY_NEED_PASSWORD, REPLY_332_NEED_ACCOUNT_FOR_LOGIN, REPLY_350_REQUESTED_FILE_ACTION_PENDING_FURTHER_INFORMATION, REPLY_421_SERVICE_NOT_AVAILABLE_CLOSING_CONTROL_CONNECTION, REPLY_425_CANT_OPEN_DATA_CONNECTION, REPLY_426_CONNECTION_CLOSED_TRANSFER_ABORTED, REPLY_450_REQUESTED_FILE_ACTION_NOT_TAKEN, REPLY_451_REQUESTED_ACTION_ABORTED, REPLY_452_REQUESTED_ACTION_NOT_TAKEN, REPLY_500_SYNTAX_ERROR_COMMAND_UNRECOGNIZED, REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS, REPLY_502_COMMAND_NOT_IMPLEMENTED, REPLY_503_BAD_SEQUENCE_OF_COMMANDS, REPLY_504_COMMAND_NOT_IMPLEMENTED_FOR_THAT_PARAMETER, REPLY_530_NOT_LOGGED_IN, REPLY_532_NEED_ACCOUNT_FOR_STORING_FILES, REPLY_550_REQUESTED_ACTION_NOT_TAKEN, REPLY_551_REQUESTED_ACTION_ABORTED_PAGE_TYPE_UNKNOWN, REPLY_552_REQUESTED_FILE_ACTION_ABORTED_EXCEEDED_STORAGE, REPLY_553_REQUESTED_ACTION_NOT_TAKEN_FILE_NAME_NOT_ALLOWED
 
Constructor Summary
DefaultFtpReply(int code, String message)
          Constructor for single-line messages
DefaultFtpReply(int code, String[] message)
          Constructor for multi-line replies
 
Method Summary
 int getCode()
          The reply code
 String getMessage()
          The reply message, might be multiple lines
 String toString()
          Must implement toString to format the reply as described in the RFC.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultFtpReply

public DefaultFtpReply(int code,
                       String message)
Constructor for single-line messages

Parameters:
code - The reply code
message - The reply message

DefaultFtpReply

public DefaultFtpReply(int code,
                       String[] message)
Constructor for multi-line replies

Parameters:
code - The reply code
message - The reply message, one line per String
Method Detail

getCode

public int getCode()
Description copied from interface: FtpReply
The reply code

Specified by:
getCode in interface FtpReply
Returns:
the code

getMessage

public String getMessage()
Description copied from interface: FtpReply
The reply message, might be multiple lines

Specified by:
getMessage in interface FtpReply
Returns:
the message

toString

public String toString()
Description copied from interface: FtpReply
Must implement toString to format the reply as described in the RFC. Most important is the handling of multi-line replies.

Specified by:
toString in interface FtpReply
Overrides:
toString in class Object
Returns:
The formated reply


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.