Class DefaultFtpReply

java.lang.Object
org.apache.ftpserver.ftplet.DefaultFtpReply
All Implemented Interfaces:
FtpReply

public class DefaultFtpReply extends Object implements FtpReply
FTP reply object.
Author:
Apache MINA Project
  • Constructor Details

    • 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[] messageLines)
      Constructor for multi-line replies
      Parameters:
      code - The reply code
      messageLines - The reply message, one line per String
  • Method Details

    • 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
    • getSentTime

      public long getSentTime()
      Description copied from interface: FtpReply
      Returns the timestamp (in milliseconds since the epoch time) when this reply was sent.
      Specified by:
      getSentTime in interface FtpReply
      Returns:
      the timestamp (in milliseconds since the epoch time) when this reply was sent.
    • isPositive

      public boolean isPositive()
      Description copied from interface: FtpReply
      Tells whether or not this reply indicates a positive completion.
      Specified by:
      isPositive in interface FtpReply
      Returns:
      true, if this reply is a positive completion or positive intermediate reply; false, otherwise.
    • 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