Package org.apache.ftpserver.ftplet
Class DefaultFtpReply
java.lang.Object
org.apache.ftpserver.ftplet.DefaultFtpReply
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionDefaultFtpReply(int code, String message) Constructor for single-line messagesDefaultFtpReply(int code, String[] messageLines) Constructor for multi-line replies -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()The reply code.The reply message, might be multiple lines.longReturns the timestamp (in milliseconds since the epoch time) when this reply was sent.booleanTells whether or not this reply indicates a positive completion.toString()Must implement toString to format the reply as described in the RFC.
-
Constructor Details
-
DefaultFtpReply
Constructor for single-line messages- Parameters:
code- The reply codemessage- The reply message
-
DefaultFtpReply
Constructor for multi-line replies- Parameters:
code- The reply codemessageLines- The reply message, one line per String
-
-
Method Details
-
getCode
public int getCode()Description copied from interface:FtpReplyThe reply code. -
getMessage
Description copied from interface:FtpReplyThe reply message, might be multiple lines.- Specified by:
getMessagein interfaceFtpReply- Returns:
- the message
-
getSentTime
public long getSentTime()Description copied from interface:FtpReplyReturns the timestamp (in milliseconds since the epoch time) when this reply was sent.- Specified by:
getSentTimein interfaceFtpReply- Returns:
- the timestamp (in milliseconds since the epoch time) when this reply was sent.
-
isPositive
public boolean isPositive()Description copied from interface:FtpReplyTells whether or not this reply indicates a positive completion.- Specified by:
isPositivein interfaceFtpReply- Returns:
true, if this reply is a positive completion or positive intermediate reply;false, otherwise.
-
toString
Description copied from interface:FtpReplyMust implement toString to format the reply as described in the RFC. Most important is the handling of multi-line replies.
-