1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.apache.commons.net.ftp; |
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
public final class FTPCommand |
31 |
|
{ |
32 |
|
|
33 |
|
|
34 |
|
public static final int USER = 0; |
35 |
|
public static final int PASS = 1; |
36 |
|
public static final int ACCT = 2; |
37 |
|
public static final int CWD = 3; |
38 |
|
public static final int CDUP = 4; |
39 |
|
public static final int SMNT = 5; |
40 |
|
public static final int REIN = 6; |
41 |
|
public static final int QUIT = 7; |
42 |
|
public static final int PORT = 8; |
43 |
|
public static final int PASV = 9; |
44 |
|
public static final int TYPE = 10; |
45 |
|
public static final int STRU = 11; |
46 |
|
public static final int MODE = 12; |
47 |
|
public static final int RETR = 13; |
48 |
|
public static final int STOR = 14; |
49 |
|
public static final int STOU = 15; |
50 |
|
public static final int APPE = 16; |
51 |
|
public static final int ALLO = 17; |
52 |
|
public static final int REST = 18; |
53 |
|
public static final int RNFR = 19; |
54 |
|
public static final int RNTO = 20; |
55 |
|
public static final int ABOR = 21; |
56 |
|
public static final int DELE = 22; |
57 |
|
public static final int RMD = 23; |
58 |
|
public static final int MKD = 24; |
59 |
|
public static final int PWD = 25; |
60 |
|
public static final int LIST = 26; |
61 |
|
public static final int NLST = 27; |
62 |
|
public static final int SITE = 28; |
63 |
|
public static final int SYST = 29; |
64 |
|
public static final int STAT = 30; |
65 |
|
public static final int HELP = 31; |
66 |
|
public static final int NOOP = 32; |
67 |
|
|
68 |
|
public static final int USERNAME = USER; |
69 |
|
public static final int PASSWORD = PASS; |
70 |
|
public static final int ACCOUNT = ACCT; |
71 |
|
public static final int CHANGE_WORKING_DIRECTORY = CWD; |
72 |
|
public static final int CHANGE_TO_PARENT_DIRECTORY = CDUP; |
73 |
|
public static final int STRUCTURE_MOUNT = SMNT; |
74 |
|
public static final int REINITIALIZE = REIN; |
75 |
|
public static final int LOGOUT = QUIT; |
76 |
|
public static final int DATA_PORT = PORT; |
77 |
|
public static final int PASSIVE = PASV; |
78 |
|
public static final int REPRESENTATION_TYPE = TYPE; |
79 |
|
public static final int FILE_STRUCTURE = STRU; |
80 |
|
public static final int TRANSFER_MODE = MODE; |
81 |
|
public static final int RETRIEVE = RETR; |
82 |
|
public static final int STORE = STOR; |
83 |
|
public static final int STORE_UNIQUE = STOU; |
84 |
|
public static final int APPEND = APPE; |
85 |
|
public static final int ALLOCATE = ALLO; |
86 |
|
public static final int RESTART = REST; |
87 |
|
public static final int RENAME_FROM = RNFR; |
88 |
|
public static final int RENAME_TO = RNTO; |
89 |
|
public static final int ABORT = ABOR; |
90 |
|
public static final int DELETE = DELE; |
91 |
|
public static final int REMOVE_DIRECTORY = RMD; |
92 |
|
public static final int MAKE_DIRECTORY = MKD; |
93 |
|
public static final int PRINT_WORKING_DIRECTORY = PWD; |
94 |
|
|
95 |
|
public static final int NAME_LIST = NLST; |
96 |
|
public static final int SITE_PARAMETERS = SITE; |
97 |
|
public static final int SYSTEM = SYST; |
98 |
|
public static final int STATUS = STAT; |
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
private FTPCommand() |
104 |
0 |
{} |
105 |
|
|
106 |
0 |
static final String[] _commands = { |
107 |
|
"USER", "PASS", "ACCT", "CWD", "CDUP", "SMNT", "REIN", "QUIT", "PORT", |
108 |
|
"PASV", "TYPE", "STRU", "MODE", "RETR", "STOR", "STOU", "APPE", "ALLO", |
109 |
|
"REST", "RNFR", "RNTO", "ABOR", "DELE", "RMD", "MKD", "PWD", "LIST", |
110 |
|
"NLST", "SITE", "SYST", "STAT", "HELP", "NOOP" |
111 |
|
}; |
112 |
|
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
public static final String getCommand(int command) |
122 |
|
{ |
123 |
0 |
return _commands[command]; |
124 |
|
} |
125 |
|
} |