Package org.apache.commons.net.ftp
Class FTPReply
java.lang.Object
org.apache.commons.net.ftp.FTPReply
FTPReply stores a set of constants for FTP reply codes. To interpret the meaning of the codes, familiarity with RFC 959 is assumed. The mnemonic constant
names are transcriptions from the code descriptions of RFC 959.
TODO replace with an enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isNegativePermanent
(int reply) Determine if a reply code is a negative permanent response.static boolean
isNegativeTransient
(int reply) Determine if a reply code is a negative transient response.static boolean
isPositiveCompletion
(int reply) Determine if a reply code is a positive completion response.static boolean
isPositiveIntermediate
(int reply) Determine if a reply code is a positive intermediate response.static boolean
isPositivePreliminary
(int reply) Determine if a reply code is a positive preliminary response.static boolean
isProtectedReplyCode
(int reply) Determine if a reply code is a protected response.
-
Field Details
-
RESTART_MARKER
- See Also:
-
SERVICE_NOT_READY
- See Also:
-
DATA_CONNECTION_ALREADY_OPEN
- See Also:
-
FILE_STATUS_OK
- See Also:
-
COMMAND_OK
- See Also:
-
COMMAND_IS_SUPERFLUOUS
- See Also:
-
SYSTEM_STATUS
- See Also:
-
DIRECTORY_STATUS
- See Also:
-
FILE_STATUS
- See Also:
-
HELP_MESSAGE
- See Also:
-
NAME_SYSTEM_TYPE
- See Also:
-
SERVICE_READY
- See Also:
-
SERVICE_CLOSING_CONTROL_CONNECTION
- See Also:
-
DATA_CONNECTION_OPEN
- See Also:
-
CLOSING_DATA_CONNECTION
- See Also:
-
ENTERING_PASSIVE_MODE
- See Also:
-
ENTERING_EPSV_MODE
- Since:
- 2.2
- See Also:
-
USER_LOGGED_IN
- See Also:
-
FILE_ACTION_OK
- See Also:
-
PATHNAME_CREATED
- See Also:
-
NEED_PASSWORD
- See Also:
-
NEED_ACCOUNT
- See Also:
-
FILE_ACTION_PENDING
- See Also:
-
SERVICE_NOT_AVAILABLE
- See Also:
-
CANNOT_OPEN_DATA_CONNECTION
- See Also:
-
TRANSFER_ABORTED
- See Also:
-
FILE_ACTION_NOT_TAKEN
- See Also:
-
ACTION_ABORTED
- See Also:
-
INSUFFICIENT_STORAGE
- See Also:
-
UNRECOGNIZED_COMMAND
- See Also:
-
SYNTAX_ERROR_IN_ARGUMENTS
- See Also:
-
COMMAND_NOT_IMPLEMENTED
- See Also:
-
BAD_COMMAND_SEQUENCE
- See Also:
-
COMMAND_NOT_IMPLEMENTED_FOR_PARAMETER
- See Also:
-
NOT_LOGGED_IN
- See Also:
-
NEED_ACCOUNT_FOR_STORING_FILES
- See Also:
-
FILE_UNAVAILABLE
- See Also:
-
PAGE_TYPE_UNKNOWN
- See Also:
-
STORAGE_ALLOCATION_EXCEEDED
- See Also:
-
FILE_NAME_NOT_ALLOWED
- See Also:
-
SECURITY_DATA_EXCHANGE_COMPLETE
- Since:
- 2.0
- See Also:
-
SECURITY_DATA_EXCHANGE_SUCCESSFULLY
- Since:
- 2.0
- See Also:
-
SECURITY_MECHANISM_IS_OK
- Since:
- 2.0
- See Also:
-
SECURITY_DATA_IS_ACCEPTABLE
- Since:
- 2.0
- See Also:
-
UNAVAILABLE_RESOURCE
- Since:
- 2.0
- See Also:
-
BAD_TLS_NEGOTIATION_OR_DATA_ENCRYPTION_REQUIRED
- Since:
- 2.2
- See Also:
-
DENIED_FOR_POLICY_REASONS
- Since:
- 2.0
- See Also:
-
REQUEST_DENIED
- Since:
- 2.0
- See Also:
-
FAILED_SECURITY_CHECK
- Since:
- 2.0
- See Also:
-
REQUESTED_PROT_LEVEL_NOT_SUPPORTED
- Since:
- 2.0
- See Also:
-
EXTENDED_PORT_FAILURE
- Since:
- 2.2
- See Also:
-
-
Method Details
-
isNegativePermanent
Determine if a reply code is a negative permanent response. All codes beginning with a 5 are negative permanent responses. The FTP server will send a negative permanent response on the failure of a command that cannot be reattempted with success.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a negative permanent response, false if not.
-
isNegativeTransient
Determine if a reply code is a negative transient response. All codes beginning with a 4 are negative transient responses. The FTP server will send a negative transient response on the failure of a command that can be reattempted with success.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a negative transient response, false if not.
-
isPositiveCompletion
Determine if a reply code is a positive completion response. All codes beginning with a 2 are positive completion responses. The FTP server will send a positive completion response on the final successful completion of a command.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive completion response, false if not.
-
isPositiveIntermediate
Determine if a reply code is a positive intermediate response. All codes beginning with a 3 are positive intermediate responses. The FTP server will send a positive intermediate response on the successful completion of one part of a multi-part sequence of commands. For example, after a successful USER command, a positive intermediate response will be sent to indicate that the server is ready for the PASS command.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive intermediate response, false if not.
-
isPositivePreliminary
Determine if a reply code is a positive preliminary response. All codes beginning with a 1 are positive preliminary responses. Postitive preliminary responses are used to indicate tentative success. No further commands can be issued to the FTP server after a positive preliminary response until a follow up response is received from the server.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive preliminary response, false if not.
-
isProtectedReplyCode
Determine if a reply code is a protected response.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a protected response, false if not.
- Since:
- 3.0
-