org.apache.commons.net.ftp

Class FTPCommand


public final class FTPCommand
extends java.lang.Object

FTPCommand stores a set of constants for FTP command 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. For those who think in terms of the actual FTP commands, a set of constants such as USER are provided where the constant name is the same as the FTP command.

Field Summary

static int
ABOR
static int
ABORT
static int
ACCOUNT
static int
ACCT
static int
ALLO
static int
ALLOCATE
static int
APPE
static int
APPEND
static int
CDUP
static int
CHANGE_TO_PARENT_DIRECTORY
static int
CHANGE_WORKING_DIRECTORY
static int
CWD
static int
DATA_PORT
static int
DELE
static int
DELETE
static int
FILE_STRUCTURE
static int
HELP
static int
LIST
static int
LOGOUT
static int
MAKE_DIRECTORY
static int
MKD
static int
MODE
static int
NAME_LIST
static int
NLST
static int
NOOP
static int
PASS
static int
PASSIVE
static int
PASSWORD
static int
PASV
static int
PORT
static int
PRINT_WORKING_DIRECTORY
static int
PWD
static int
QUIT
static int
REIN
static int
REINITIALIZE
static int
REMOVE_DIRECTORY
static int
RENAME_FROM
static int
RENAME_TO
static int
REPRESENTATION_TYPE
static int
REST
static int
RESTART
static int
RETR
static int
RETRIEVE
static int
RMD
static int
RNFR
static int
RNTO
static int
SITE
static int
SITE_PARAMETERS
static int
SMNT
static int
STAT
static int
STATUS
static int
STOR
static int
STORE
static int
STORE_UNIQUE
static int
STOU
static int
STRU
static int
STRUCTURE_MOUNT
static int
SYST
static int
SYSTEM
static int
TRANSFER_MODE
static int
TYPE
static int
USER
static int
USERNAME

Method Summary

static String
getCommand(int command)
Retrieve the FTP protocol command string corresponding to a specified command code.

Field Details

ABOR

public static final int ABOR

Field Value:
21


ABORT

public static final int ABORT

Field Value:
21


ACCOUNT

public static final int ACCOUNT

Field Value:
2


ACCT

public static final int ACCT

Field Value:
2


ALLO

public static final int ALLO

Field Value:
17


ALLOCATE

public static final int ALLOCATE

Field Value:
17


APPE

public static final int APPE

Field Value:
16


APPEND

public static final int APPEND

Field Value:
16


CDUP

public static final int CDUP

Field Value:
4


CHANGE_TO_PARENT_DIRECTORY

public static final int CHANGE_TO_PARENT_DIRECTORY

Field Value:
4


CHANGE_WORKING_DIRECTORY

public static final int CHANGE_WORKING_DIRECTORY

Field Value:
3


CWD

public static final int CWD

Field Value:
3


DATA_PORT

public static final int DATA_PORT

Field Value:
8


DELE

public static final int DELE

Field Value:
22


DELETE

public static final int DELETE

Field Value:
22


FILE_STRUCTURE

public static final int FILE_STRUCTURE

Field Value:
11


HELP

public static final int HELP

Field Value:
31


LIST

public static final int LIST

Field Value:
26


LOGOUT

public static final int LOGOUT

Field Value:
7


MAKE_DIRECTORY

public static final int MAKE_DIRECTORY

Field Value:
24


MKD

public static final int MKD

Field Value:
24


MODE

public static final int MODE

Field Value:
12


NAME_LIST

public static final int NAME_LIST

Field Value:
27


NLST

public static final int NLST

Field Value:
27


NOOP

public static final int NOOP

Field Value:
32


PASS

public static final int PASS

Field Value:
1


PASSIVE

public static final int PASSIVE

Field Value:
9


PASSWORD

public static final int PASSWORD

Field Value:
1


PASV

public static final int PASV

Field Value:
9


PORT

public static final int PORT

Field Value:
8


PRINT_WORKING_DIRECTORY

public static final int PRINT_WORKING_DIRECTORY

Field Value:
25


PWD

public static final int PWD

Field Value:
25


QUIT

public static final int QUIT

Field Value:
7


REIN

public static final int REIN

Field Value:
6


REINITIALIZE

public static final int REINITIALIZE

Field Value:
6


REMOVE_DIRECTORY

public static final int REMOVE_DIRECTORY

Field Value:
23


RENAME_FROM

public static final int RENAME_FROM

Field Value:
19


RENAME_TO

public static final int RENAME_TO

Field Value:
20


REPRESENTATION_TYPE

public static final int REPRESENTATION_TYPE

Field Value:
10


REST

public static final int REST

Field Value:
18


RESTART

public static final int RESTART

Field Value:
18


RETR

public static final int RETR

Field Value:
13


RETRIEVE

public static final int RETRIEVE

Field Value:
13


RMD

public static final int RMD

Field Value:
23


RNFR

public static final int RNFR

Field Value:
19


RNTO

public static final int RNTO

Field Value:
20


SITE

public static final int SITE

Field Value:
28


SITE_PARAMETERS

public static final int SITE_PARAMETERS

Field Value:
28


SMNT

public static final int SMNT

Field Value:
5


STAT

public static final int STAT

Field Value:
30


STATUS

public static final int STATUS

Field Value:
30


STOR

public static final int STOR

Field Value:
14


STORE

public static final int STORE

Field Value:
14


STORE_UNIQUE

public static final int STORE_UNIQUE

Field Value:
15


STOU

public static final int STOU

Field Value:
15


STRU

public static final int STRU

Field Value:
11


STRUCTURE_MOUNT

public static final int STRUCTURE_MOUNT

Field Value:
5


SYST

public static final int SYST

Field Value:
29


SYSTEM

public static final int SYSTEM

Field Value:
29


TRANSFER_MODE

public static final int TRANSFER_MODE

Field Value:
12


TYPE

public static final int TYPE

Field Value:
10


USER

public static final int USER

Field Value:
0


USERNAME

public static final int USERNAME

Field Value:
0

Method Details

getCommand

public static final String getCommand(int command)
Retrieve the FTP protocol command string corresponding to a specified command code.

Parameters:
command - The command code.

Returns:
The FTP protcol command string corresponding to a specified command code.